import java.util.*;

/**
 *author:ljq
 */
public class Main {
    public static 
    void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别       
        String num = in.nextLine();
        StringBuilder sb = new StringBuilder(num);
        char[] ary = sb.reverse().toString().toCharArray();       
        HashSet<Integer> set = new HashSet<>();
        for(int i = 0;i < ary.length;i++){
            String s = ary[i] + "";
            if(set.add(Integer.parseInt(s))){
                System.out.print(s);
            }
        }  
    }
}