#Java 7, <s>166</s> <s>66</s> <s>63</s> <s>52</s> 43 bytes int c(String s){return s.trim().charAt(1);} Outputs `35` for right and `32` for left. Based on [*@Clashsoft*'s Dyvil answer](https://codegolf.stackexchange.com/a/114492/52210). **Explanation:** int c(String s){ // Method with String parameter and integer return-type return s.trim() // Remove leading and trailing whitspaces .charAt(1); // and return the second character (as int value) } // End of method **Test code:** class M{ static int c(String s){return s.trim().charAt(1);} public static void main(String[] a){ System.out.println(c(" ## #\n ## #\n ###\n #\n #\n #")); System.out.println(c(" ## # \n ## # \n ###\n ##\n #\n #\n #")); System.out.println(c(" ## # \n ## # \n ###\n ##\n # \n # \n # ")); System.out.println(c(" ## # \n ## # \n ###\n #\n # \n # \n # ")); System.out.println(c(" # ## \n # ## \n ###\n #\n # \n # \n # ")); System.out.println(c(" # ## \n # ## \n ###\n #\n #\n #\n #")); } } [Try it here.](https://tio.run/nexus/java-openjdk#vZCxDoIwGIR3nuJCl3YhcWbyAZwY1aFWok2gEPpjYgjPji2UxIgGB@N0l97dlz9VhbQWuy4CLEnSCoM2BMUzarS5wIquyaltDGziXkouEnWVzZb4RqT9ANTtqXCrML5V@oxSahP2@yOk8HAgu1vKy6RqKaldRIXhisdgzIfsYDDa0Tg3KV4kFiJdg3leoLHJPeGCYqE/IrOpMKa@/g12hr3FLqheVqnTRXM9uP9QP/9tH/XDAw) **Output:** 35 35 35 35 32 32