import re s=re.sub('^w+','',input()) l=re.split(r'([^w]+w+)',s) a=[x.count('w') for x in l] if max(a)<1: print('') else: for i in [n for n, x in enumerate(a) if x==max(a)]: print(l[i].replace('w',''))