rstring = ->(st) { st + (0...18).map { |i| (?a.ord + rand(26)).chr } .join + st } n = gets.to_i (n - 1).times { |i| puts rstring[?a] } puts rstring[?a] + ?n