# -*- coding: utf-8 -*- s=gets.chomp s=s+"." a=Array.new(101).map{Array.new(0,0)} b=Array.new(101).map{Array.new(0,0)} c=Array.new(101,0) d=0 x=0 t=0 r=0 n=s.length-1 for i in 0..n if s[i]=="w" if d==0 r=i end d=d+1 else if d>0 a[d].push(t) b[d].push(r) c[d]=c[d]+1 t=i if x0 f=0 for i in 0..m-1 if a[x][i]!=b[x][i] for j in a[x][i]..b[x][i]-1 print(s[j]) end puts "" f=1 end end if f==0 puts "" end else puts "" end