import java.util.*;
public class Main {
public static void main(String[] args) { Scanner sc = new Scanner(System.in); String [] strArray = sc.nextLine().split(""); int len = strArray.length; StringBuilder sb = new StringBuilder(); Map<String,String> map = new HashMap(); for(int i=len-1;i>=0;i--){ if(map.containsKey(strArray[i])){ continue; } map.put(strArray[i],"1"); sb.append(strArray[i]); } System.out.println(sb.toString()); }
}