public int getDistance(String a, String b, String letterSet) {
		int sum = 0;
		for (int i = 0; i < letterSet.length(); i++) {
			int n1 = 0, n2 = 0;
			char c = letterSet.charAt(i);
			for (int j = 0; j < a.length(); j++) {
				if (Character.toLowerCase(a.charAt(j)) == c) {
					n1++;
				}
			}
			for (int j = 0; j < b.length(); j++) {
				if (Character.toLowerCase(b.charAt(j)) == c) {
					n2++;
				}
			}
			sum += (n1 - n2) * (n1 - n2);
		}
		return sum;
	}