import List;main=interact(\s->unwords[a|a:b<-group$sort$words s,b==[]])