#include const int l = 50000; const int m = 5000; int main() { for(int i = 0; i < l; i++) { printf(i % 2 == 0 ? "A" : "B"); } printf("\n%d\n", m); char s[] = "ABABABABAB"; int c = 0; while(c < m) { printf("%s\n", s); int d = 9; while(s[d] == 'Z') { s[d] = 'A'; d--; } s[d]++; c++; } return 0; }