public String nextString() {
   int c = read();
   while (isSpaceChar(c)) c = read();
   StringBuilder res = new StringBuilder();
   do {
     res.appendCodePoint(c);
     c = read();
   } while (!isSpaceChar(c));
   return res.toString();
 }
 private String readLine0() {
   StringBuilder buf = new StringBuilder();
   int c = read();
   while (c != '\n' && c != -1) {
     if (c != '\r') {
       buf.appendCodePoint(c);
     }
     c = read();
   }
   return buf.toString();
 }