import java.util.HashMap;
import java.util.Scanner;
/**
* @author
* Created by Administrator on 2022-05-06 03:55
*/
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String str = sc.nextLine();
char[] arr = str.toCharArray();
// 用HashMap记录每个字符出现的次数
HashMap<Character,Integer> map = new HashMap<>();
for (int i = 0; i < arr.length; i++) {
//map 统计频率
map.put(arr[i],map.getOrDefault(arr[i],0) + 1);
}
// 快速找出最少次数
int min = Integer.MAX_VALUE;
for(Integer v:map.values()){
min = Integer.min(min,v);
}
//遍历输入str
for(int i=0;i<str.length();i++){
if(map.get(str.charAt(i))!=min){
System.out.print(""+ str.charAt(i));
}
}
}
}