public int howManyPairs(String[] words)
	{
		int count = 0;
		for (int i = 0; i < words.length; i++) {
			for (int j = i + 1; j < words.length; j++) {
				if (check(words[i], words[j])) {
					count++;
				}
			}
		}
		return count;
	}