#include "testlib.h"
#include <iostream>

using namespace std;

int main(int argc, char *argv[]) {
    registerGen(argc, argv, 1);
    
    int n = opt<int>(1), k = opt<int>(2), A = opt<int>(3);
    cout << n << ' ' << k << '\n';
    int lim = A / n;
    for (int i = 0; i < n; i++) {
        string s;
        int sz = rnd.next(5, lim);
        for (int j = 0; j < sz; j++)
            s += char('a' + rnd.next(26));
        cout << s << '\n';
    }
    
    string al = "abcdefghijklmnopqrstuvwxyz";
    shuffle(al.begin(), al.end());
    string r1, r2, r3;
    for (int i = 0; i < 9; i++)
        r1 += al[i];
    for (int i = 9; i < 18; i++)
        r2 += al[i];
    for (int i = 18; i < 22; i++)
        r3 += al[i];
    r3 += ' ';
    for (int i = 22; i < 26; i++)
        r3 += al[i];
    cout << r1 << '\n' << r2 << '\n' << r3 << '\n';
}
