using System; using static System.Console; using System.Linq; using System.Collections.Generic; class Program { static int NN => int.Parse(ReadLine()); static int[] NList => ReadLine().Split().Select(int.Parse).ToArray(); static int[][] NArr(long n) => Enumerable.Repeat(0, (int)n).Select(_ => NList).ToArray(); public static void Main() { Solve(); } static void Solve() { var n = NN; var c = ReadLine().Split(); var (s, t) = (c[0], c[1]); var a = NList; var ans = new string[n]; for (var i = 0; i < n; ++i) { var sc = 0; for (var j = 0; j * s.Length <= a[i]; ++j) { if ((a[i] - j * s.Length) % t.Length == 0) { sc = j; } } var list = new List(); for (var j = 0; j < sc; ++j) list.Add(s); for (var j = 0; j < (a[i] - sc * s.Length) / t.Length; ++j) list.Add(t); ans[i] = string.Join(" ", list); } WriteLine(string.Join("\n", ans)); } }