#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <algorithm>

int main(int argc, char **argv) {
    int n = 2 * (atoi(argv[1]) / 2);
    char c = argv[2][0];
    char c2 = argv[3][0];

    assert(n >= 1 && n <= 100000);
    assert(c >= 'a' && c <= 'z');
    assert(c2 >= 'a' && c2 <= 'z');

    char data[100001];

    for (int i = 0; i < n / 2; i++) {
        data[i] = c;
        data[i + n / 2] = c2;
    }
    data[n] = 0;

    std::random_shuffle(data, data + n);

    printf("%s\n", data);

    std::random_shuffle(data, data + n);

    printf("%s\n", data);

    return 0;
}