import java.util.Scanner;


public class Main{

    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        while(sc.hasNext()){
            String str = sc.nextLine();
            int[] a =  new int[10];
            StringBuffer sb = new StringBuffer();
            for(int i = str.length() - 1; i >= 0; i--){
                int index = str.charAt(i) - '0';
                if(a[index] == 0){
                    sb.append(index);
                }
                a[index]++;
            }
            System.out.println(sb);
        }
        sc.close();
    }
}