#load"str.cma";;List.fold_left(fun a b->if a=b then""else(a>""&()=print_string(a^" ");b))""(Sort.list(<)("~"::(Str.split(Str.regexp" ")(read_line()^" "^read_line()))))