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

int main(int argc, char **argv) {
	int n = 26 * (atoi(argv[1]) / 26);
	srand(atoi(argv[2]));

	char s[100001];
	for (int i = 0; i < n; i++) {
		s[i] = (char) ('a' + i % 26);
	}
	s[n] = 0;
	std::random_shuffle(s, s + n);
	printf("%s\n", s);
	std::random_shuffle(s, s + n);
	printf("%s\n", s);
	return 0;
}
