#include "testlib.h"
#include <bits/stdc++.h>

using namespace std;

signed main(int argc, char *argv[]) {
    registerGen(argc, argv, 1);
    int type = opt<int>(1);
    int n = rnd.next(1, 26);
    println(n);
    int pows[7] = {1, 10, 100, 1'000, 10'000, 100'000, 1'000'000};
    println(rnd.next(
            format("[a-%c]{%d,%d}", (char) ('a' + n - 1), min(n, pows[type]),
                   max(2 * n, min(1'000'000, pows[type] * 10)))));
}
