import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); String s=sc.nextLine(); Map<Character,Integer> map=new HashMap<>(); for(char ch:s.toCharArray()){ map.put(ch,map.getOrDefault(ch,0)+1); } // Collection<Integer> col=map.values(); //Set<Character> set=map.keySet(); Collection<Integer> col=map.values(); //Collections: min max sort reverse shuffle fill swap int min=Collections.min(col); for(char ch:map.keySet()){ if(map.get(ch)==min){ s=s.replace(ch+"",""); } } System.out.println(s); } }