# -*- coding: utf-8 -*- import re S = raw_input().decode("utf-8") sp1 = filter(None, re.split(u'w+', S)) sp2 = map(len, filter(None, re.split(u'[^w]+', S))) if S.startswith(u'w'): sp2.pop(0) if not S.endswith(u'w'): sp2.append(0) m = max(sp2) for i in xrange(len(sp1)): if sp2[i] == m: print sp1[i]