using System.Collections.Generic; using System; public class Hello { static void Main() { var k = int.Parse(Console.ReadLine().Trim()); getAns(k); } static void getAns(int k) { var q = new Queue[4]; for (int i = 0; i < 4; i++) q[i] = new Queue(); q[0].Enqueue('A'); q[1].Enqueue('B'); q[2].Enqueue('C'); q[3].Enqueue('D'); q[0].Enqueue('E'); for (int i = 0; i < k; i++) q[(i + 1) % 4].Enqueue(q[i % 4].Dequeue()); foreach (var x in q) Console.WriteLine(String.Join("", x)); } }