import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class Main {
    //下面正确思路:先倒置数组  再放进Map中  最后去重输出
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] c = sc.nextLine().toCharArray();
        char[] c_d = new char[c.length];
        //倒置数组
        for (int i= 0; i<c.length ; i++){
            c_d[c.length-i-1] = c[i];
        }
        //放入map
        Map<Integer, Character> table = new HashMap<>();
        for (int i = 0; i < c.length; i++) {
          if (table.containsValue(c_d[i])) continue;
            else    table.put( i,  c_d[i]);
        }
        //去重输出
        for (int i = 0; i< c.length ;i++){
            if (table.get(i)!=null) System.out.print(table.get(i));
            else continue;
        }

    }
}
/*
正确思路:先倒置 再去重输出
2344356
6534432
65342
错误思路:先去重 再倒置输出
2344356
23456
65432
*/