import java.util.*;
public class Main{
public static void main(String[] args){
Scanner scanner = new Scanner(System.in);
while(scanner.hasNext()){
String str = scanner.nextLine();
//创建map用于存储字符以及出现次数的键值对容器
Map<String,Integer> map = new HashMap<>();
String[] strs = str.split("");
for(String s : strs){
int count = 0;
for(int i=0;i<strs.length;i++){
if(s.equals(strs[i])){
count++;
map.put(s,count);
}
}
}
//假设出现最小次数是min
int min = Integer.MAX_VALUE;
for(int item : map.values()){
//比较出实际出现的最小次数
min= Math.min(item,min);
}
StringBuffer buffer = new StringBuffer();
for(String s : strs){
if(map.get(s)>min)
buffer.append(s);
}
System.out.println(buffer.toString());
}
}
}