import java.util.HashSet;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
      
       Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        while (n % 10 == 0){
            n = n / 10;
            if(n % 10 != 0){
                break;
            }
        }
        String str = n + "";
        String end = "";
        HashSet<Character> integer = new HashSet<>();
        ArrayList arrl = new ArrayList();
        for (int i = str.length() - 1; i >= 0; i--) {
            if(integer.add(str.charAt(i))){
                end = end + str.charAt(i);
            }
        }
        for (int i = 0; i < end.length() ; i++) {
            System.out.print(end.charAt(i));
        }
       

    }
}