import java.util.*; public class JohnChecker { public static final int MINN = 1; public static final int MAXN = 26; public static final int MINM = 1; public static final int MAXM = 2000; public static final int MINP = 1; public static final int MAXP = 100; public static String[] ballots = new String[MAXM]; public static int nBallots = 0; public static void printError(int line, String msg) { System.out.println("ERROR Line " + line + ": " + msg); System.exit(-1); } public static void checkIntBounds(int x, int min, int max, String name, int nLines) { if (x < min || x > max) printError(nLines, "invalid " + name + " value: " + x); } public static boolean ok(String b, int n) { for(int i = 0; i