import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
String num = sc.nextLine();
LinkedHashSet<Character> set = new LinkedHashSet<>();
for(int i = num.length()-1;i>=0;i--){
if(set.size()<10){
set.add(num.charAt(i));//自动会去重
}else{
break;//大于等于10已经收集够10个数字了
}
}
StringBuilder sb = new StringBuilder();
for(Character c:set){
sb.append(c);
}
System.out.println(sb.toString());
}
}