public static void main(String[] args) throws IOException {
		int[] letters = loadFile("assets/problem059.txt");
		int counter = 0;
		
		for(int a = 97; a <= 122; a++) {
			for(int b = 97; b <= 122; b++) {
				for(int c = 97; c <= 122; c++) {
					StringBuilder full = new StringBuilder();
					for(int i = 0; i < letters.length; i++) {
						int letter = letters[i];
						switch(counter % 3) {
							case 0: letter ^= a; break;
							case 1: letter ^= b; break;
							case 2: letter ^= c; break;
						}
						full.append((char) letter);
						counter++;
					}
					
					if(isDecrypted(full.toString())) {
						System.out.println(getLongValue(full.toString().toCharArray()));
						break;
					}
				}
			}
		}
	}