import java.io.PrintWriter import java.util.* import kotlin.math.* fun PrintWriter.solve() { val k = nextInt() val ques = Array(4) { ArrayDeque() } ques[0].addLast('A') ques[0].addLast('E') ques[1].addLast('B') ques[2].addLast('C') ques[3].addLast('D') for (i in 0 until k) { val c = ques[i % 4].pollFirst()!! ques[(i + 1) % 4].addLast(c) } for (i in 0 until 4) { println(ques[i].joinToString("")) } } fun main() { Thread(null, { val writer = PrintWriter(System.out, false) writer.solve() writer.flush() }, "solve", abs(1L.shl(26))) .apply { setUncaughtExceptionHandler { _, e -> e.printStackTrace(); kotlin.system.exitProcess(1) } } .apply { start() }.join() } // region Scanner private var st = StringTokenizer("") private val br = System.`in`.bufferedReader() fun next(): String { while (!st.hasMoreTokens()) st = StringTokenizer(br.readLine()) return st.nextToken() } fun nextInt() = next().toInt() fun nextLong() = next().toLong() fun nextLine() = br.readLine() fun nextDouble() = next().toDouble() // endregion