#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import math import codecs sys.stdin = codecs.getreader('utf-8')(sys.stdin) sys.stdout = codecs.getwriter('utf-8')(sys.stdout) S=raw_input().strip() while S.startswith(u"w"): S = S[1:] L=[] for c in S: if len(L)==0: L.append(c) else: if (c==u"w") ^ (L[-1].find(u"w")==-1): L[-1] += c else: L.append(c) ma=0 for c in L: if c.find(u"w")!=-1: ma = max(ma,len(c)) for i in range(len(L)): c = L[i] if c.find(u"w")!=-1 and len(c) == ma: print L[i-1]