import java.io.*; class UserInput { public static BufferedReader commandLine = new BufferedReader( new InputStreamReader(System.in)); public static char readChar() { String s = new String(); try { s = commandLine.readLine(); } catch (IOException e) { e.printStackTrace(); } return s.charAt(0); } public static double readDouble() { String s = new String(); try { s = commandLine.readLine(); } catch (IOException e) { e.printStackTrace(); } return Double.parseDouble(s); } public static int readInt() { String s = new String(); try { s = commandLine.readLine(); } catch (IOException e) { e.printStackTrace(); } return Integer.parseInt(s); } public static String readString() { String s = new String(); try { s = commandLine.readLine(); } catch (IOException e) { e.printStackTrace(); } return s; } }