import java.util.*;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String str = in.nextLine();
        StringBuilder sb = new StringBuilder();
        HashSet<Integer> set = new HashSet<>();

        for(int i = str.length() - 1; i > -1; i--) {
            int v = Integer.parseInt(str.charAt(i) + "");
            if(!set.contains(v)) {
                set.add(v);
                sb.append(v);
            }
        }

        System.out.println(sb.toString());
    }
}