public String getLegend(String[] cityMap, int[] POIs) {
		HashMap<Character, Integer> map = new HashMap<Character, Integer>();
		for (String str : cityMap) {
			for (char c : str.toCharArray()) {
				if (c=='.'){
					continue;
				}
				Integer integer = map.get(c);
				if (integer == null) {
					integer = 0;
				}
				map.put(c, integer + 1);
			}
		}
		String result = "";
		for (int i = 0; i < POIs.length; i++) {
			int j = POIs[i];
			for (char c : map.keySet()) {
				if (map.get(c) == j) {
					result += c;
					break;
				}
			}
		}
		return result;

	}