public char getMax(String param0) {
		

		if (param0.matches("^[A-Za-z0-9]")) {
			return ' ';
		}

		char[] array = param0.toCharArray();

		Map<Character, String> map = new HashMap<Character, String>();

		for (int i = 0; i < array.length; i++) {
			String mapChar = map.get(array[i]);
			if (null != mapChar) {
				String[] def = mapChar.split(":");
				int count = Integer.parseInt(def[0]);
				int index = Integer.parseInt(def[1]);
				count++;
				map.put(array[i], "" + count + ":" + index);
			} else {
				map.put(array[i], "" + 1 + ":" + i);
			}
		}

		int maxCount = 0;
		int minIndex = 0;
		char result = 0;
		for (Character c : map.keySet()) {
			String[] def = map.get(c).split(":");
			int count = Integer.parseInt(def[0]);
			int index = Integer.parseInt(def[1]);

			if (count > maxCount) {
				maxCount = count;
				minIndex = index;
				result = c;
			} else if (count == maxCount && minIndex > index) {
				maxCount = count;
				result = c;
				minIndex = index;
			}
		}

		return result;
	}