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