public class Main {
        public static void main(String[] args) {
            Scanner sc = new Scanner(System.in);
            while (sc.hasNextLine()) {
                String str = sc.nextLine();
                char[] charList = str.toCharArray();
                Map<Character, Character> map = new LinkedHashMap<Character, Character>();
                for (int i = charList.length - 1; i >=0; i--) {
                    char c = charList[i];
                    map.putIfAbsent(c, c);
                }
                for(Map.Entry<Character, Character> entry : map.entrySet()) {
                    System.out.print(entry.getKey());
                }
            }
        }
           
}