1 2 3 4 5 6 7 8 9
input = $stdin.read.strip.chars sopm = 0 until input[sopm, 4].uniq.count == 4 do sopm += 1 end puts sopm + 4