class Yukicoder def initialize s = gets.chomp if s.match(/(c.*w.*w)/) puts $1.size else puts -1 end end end Yukicoder.new