public String[] getAbbreviations(String[] words) {
		String[] result = new String[words.length];
		for (int i = 0; i < words.length; i++) {
			for (int j = 0; j < words[i].length(); j++) {
				String substring = words[i].substring(0, j+1);
				boolean hit = false;
				for (int k = 0; k < words.length; k++) {
					if (k == i)
						continue;
					if (words[k].startsWith(substring)) {
						hit = true;
					}
				}
				if (!hit) {
					result[i] = substring;
					break;
				}
			}
		}
		return result;
	}