public class Main{
public static void main(String[] args){
Scanner scanner = new Scanner(System.in);
while(scanner.hasNextLine()) {
String str = scanner.nextLine();
HashMap<Character, Integer> hashtable = new HashMap<Character,Integer>();
for(int i = 0;i<str.length();i++) {
if(!hashtable.containsKey(str.charAt(i))){
System.out.print(str.charAt(i));
hashtable.put(str.charAt(i),i);
}
}
System.out.println();
}
}
}
哈希表yyds!