# your code goes here str=STDIN.gets len=-1; (str.size).times do |i| a=str.slice(i,str.size).match(/c[^c]*?w[^w]*?w/i) if a if len==-1 || a.string.size