using System; using System.Linq; using System.Text; using System.Collections.Generic; public class Test { static readonly Char[] letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".ToCharArray(); private static String appendChars(int n) { int length = n + 1; StringBuilder sBuilder = new StringBuilder("A", length); for (int i = n; sBuilder.Length < length; i += n) { Char nextChar = letters[i % letters.Length]; sBuilder.Append(nextChar); } return sBuilder.ToString(); } public static void Main() { int n = 5; IEnumerable allWords = Enumerable.Range(0, n).Select(i => appendChars(i)); String result = string.Join(Environment.NewLine, allWords.ToArray()); Console.Write(result); } }