while 1: s=set();r="" for c in input(): r+=c if c in "stop": s.add(c) if len(s)==4:break print(r)