p gets.gsub(/(?=(c.*?w.*?w))/).map{$1.size}.min || -1