public static void prepareAnswers() throws IOException {
        int kValue = 3;
		File dataFile = new File(String.format("res/hamming/geonames_k%d_testdata.csv", kValue));
		List<String> data = readDataAsStrings(dataFile);
//		for (int i = 0; i < data.size(); i++) {
//			System.out.println(i + ": " + data.get(i));
//		}

		File queriesFile = new File(String.format("res/hamming/geonames_k%d_testqueries.csv", kValue));
		List<Query> queries = readQueries(queriesFile);

		File answersFile = new File(String.format("res/hamming/geonames_k%d_testanswers.csv", kValue));
		FileWriter fw = new FileWriter(answersFile, true);
		BufferedWriter bw = new BufferedWriter(fw);

		int total = queries.size();
		for (int i = 0; i < queries.size(); i++) {

			if (i % 100 == 0) {
				System.out.printf("Left: %d\n", total-i-1);
			}

			Query q = queries.get(i);

			int id = q.id;
			String p = q.pattern;
			int k = q.k;

			Set<Integer> set = new HashSet<>();
			for (int j = 0; j < data.size(); j++) {
				String s = data.get(j);
				if (BruteForce.areHammingEqual(p, s, k)) {
					set.add(j + 1);
				}
			}

//			System.out.printf("%d:", id);
			bw.append(String.format("%d:", id));
			if (set.isEmpty()) {
//				System.out.print("NO");
				bw.append("NO");
			} else {
				Iterator<Integer> iterator = set.iterator();
				while (iterator.hasNext()) {
//					System.out.print(iterator.next());
					bw.append(String.valueOf(iterator.next()));

					if (iterator.hasNext()) {
//						System.out.printf(",");
						bw.append(",");
					}
				}
			}
//			System.out.println();
			bw.newLine();
		}
		bw.close();
		fw.close();
		System.out.println("Finished.");
	}