import re,os while 1:print re.sub(r'(.)\D*?\1',r'\1',os.read(0,53)*99).split()[0]