import java.util.Scanner; import java.util.HashMap; // 注意类名必须为 Main, 不要有任何 package xxx 信息 public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); String nextLine = scanner.nextLine(); HashMap<Character, Integer> hashMap = new HashMap<>(); char[] toCharArray = nextLine.toCharArray(); for (char aChar : toCharArray) { if (hashMap.containsKey(aChar)) { hashMap.put(aChar, hashMap.get(aChar) + 1); } else { hashMap.put(aChar, 1); } } int min = Integer.MAX_VALUE; for (Integer value : hashMap.values()) { min = Math.min(min, value); } for (char aChar : toCharArray) { if (hashMap.get(aChar) != min) { System.out.print(aChar); } } System.out.println(); } }