s = gets if s =~ /^w+$/ || s !~ /w/ then puts "" end max = s.scan(/w+/).map{|s| s.length}.max puts s.scan(/([^w]+)w{#{max}}/)