public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
String str = String.valueOf(n);
List<Character> list = new ArrayList<>();
for (int i = str.length()-1;i>=0;i--){
if (list.contains(str.charAt(i))){
continue;
}
list.add(str.charAt(i));
}
StringBuffer sb = new StringBuffer();
for (char a:list
) {
sb.append(a);
}
System.out.println(Integer.valueOf(sb.toString()));
}
}