import java.util.*;
class Ideone {
public static void main (String[] args) {
    System.out.println(findZenithLetter("I can reach the apex, at the top of the world."));
System.out.println(findZenithLetter("I am Sam."));
System.out.println(findZenithLetter("I am ~30 years old"));
System.out.println("'"+findZenithLetter("$&@")+"'");
System.out.println("'"+findZenithLetter("")+"'");
}
public static String findZenithLetter(String str) {
    if (str.isEmpty()) {
        return "";
    }
    String next = str.substring(0, 1);
    String rest = findZenithLetter(str.substring(1));
    return Character.isLetter(next.charAt(0)) && next.compareToIgnoreCase(rest) > 0 ? next : rest;
}
}