import java.util.Scanner;
public class Main{
    
    public static void main(String []args){
        Scanner scanner=new Scanner(System.in);
        while(scanner.hasNext()){
            System.out.println(clearReplicateAndRev(scanner.nextInt()));
        }
    }
    
    private static int clearReplicateAndRev(int num){
        int[] hash=new int[10];
        int newNum=0;
        while(num!=0){
            int current=num%10;
            if(hash[current]==0){
                hash[current]++;
                 newNum=newNum*10+ current;
            }
            num/=10;
        }
        return newNum;
    }
}