import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
String str=sc.nextLine();
char[] charArr=str.toCharArray();
//LinkedHashSet 按插入的顺序有序排列
Set<Character> set=new LinkedHashSet<Character>();
for(int i=charArr.length-1;i>=0;i--){
set.add(charArr[i]);
}
for(Character c:set){
System.out.print(c);
}
}
}
public class Main{
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
String str=sc.nextLine();
char[] charArr=str.toCharArray();
//LinkedHashSet 按插入的顺序有序排列
Set<Character> set=new LinkedHashSet<Character>();
for(int i=charArr.length-1;i>=0;i--){
set.add(charArr[i]);
}
for(Character c:set){
System.out.print(c);
}
}
}