week1 = gets.chomp week2 = gets.chomp week1.concat week2 p week1.split('x').map{|i|i.size}.max || 0