import java.util.Scanner;

public class Main{

    public static void main(String[] args){

        Scanner sc = new Scanner(System.in);
        String nums = sc.nextLine();
        int[] map = new int[10];
        StringBuilder sb = new StringBuilder();
        for(int i = nums.length() - 1;i >= 0;i--){

            if(map[nums.charAt(i)-'0'] == 0){
                sb.append(nums.charAt(i));
                map[nums.charAt(i)-'0'] = 1;
            }else{
                continue;
            }
        }

        System.out.println(sb);
    }
}