import java.util.Scanner;
public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in);
//逆序排列
StringBuilder stringBuilder = new StringBuilder(scanner.nextLine()).reverse();
String str = stringBuilder.toString();
//结果集
StringBuilder result = new StringBuilder();
for (int i = 0; i < str.length(); i++) {
if (str.indexOf(str.charAt(i)) == i) {
result.append(str.charAt(i));
}
}
System.out.println(result.toString());
}
}