import java.io.*; public class Stdin { private static BufferedReader input = new BufferedReader (new InputStreamReader(System.in)); private static String Line = ""; public static boolean readBoolean() {// read a boolean from the standard input device try{ Line = input.readLine(); } catch (IOException e) {System.out.println(e);} if (Line.toLowerCase().equals("true")) return true; if(Line.toLowerCase().equals("false")) return false; System.out.println("Error! Setting boolean to false."); return false; } public static char readChar() {// read a char from the standard input device try{ Line = input.readLine(); } catch (IOException e) {System.out.println(e);} return Line.charAt(0); } public static String readString() {// read a String from the standard input device try{ Line = input.readLine(); } catch (IOException e) {System.out.println(e);} return Line; } public static byte readByte() {// read a byte from the standard input device try{ Line = input.readLine(); } catch (IOException e) {System.out.println(e);} return Byte.parseByte(Line); } public static short readShort() {// read a short from the standard input device try{ Line = input.readLine(); } catch (IOException e) {System.out.println(e);} return Short.parseShort(Line); } public static int readInt() {// read a int from the standard input device try{ Line = input.readLine(); } catch (IOException e) {System.out.println(e);} return Integer.parseInt(Line); } public static long readLong() {// read a long from the standard input device try{ Line = input.readLine(); } catch (IOException e) {System.out.println(e);} return Long.parseLong(Line); } public static float readFloat() {// read a float from the standard input device try{ Line = input.readLine(); } catch (IOException e) {System.out.println(e);} return Float.parseFloat(Line); } public static double readDouble() {// read a float from the standard input device try{ Line = input.readLine(); } catch (IOException e) {System.out.println(e);} return Double.parseDouble(Line); } }