public static String readString() {
        String line = null;
        try {
            BufferedReader is = new BufferedReader(new InputStreamReader(
                    System.in));
            line = is.readLine();
        } catch (NumberFormatException ex) {
            System.err.println("Not a valid number: " + line);
        } catch (IOException e) {
            System.err.println("Unexpected IO ERROR: " + e);
        }
        return line;
    }