import java.util.*;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str = scanner.nextLine();
        HashMap<Integer, Integer> map = new HashMap<>();
        for (int i = 0; i < str.length(); i++) {
            char c = str.charAt(i);
            int n = 0;
            for (int j = 0; j < str.length(); j++) {
                if (str.charAt(j) == c) {
                    n++;
                }
            }
            map.put(i, n);
        }
        int min = Integer.MAX_VALUE;
        for (Integer key : map.keySet()) {
            if (min > map.get(key)) {
                min = map.get(key);
            }
        }
        List<Integer> list = new ArrayList<>();
        for (Integer key : map.keySet()) {
            if (min == map.get(key)) {
                list.add(key);
            }
        }
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < str.length(); i++) {
            if (list.contains(i)) {
                continue;
            }
            sb.append(str.charAt(i));
        }
        System.out.println(sb);
    }
}