#include <bits/stdc++.h>
using namespace std;
int n;
string a, b;
char c;
void Work(int len) {
  if (len == 1) {
    c = 'A', a = "", b = c;
  } else if (len == 2) {
    c = 'B', a = "B", b = "AB";
  } else if (len & 1) {
    Work(len >> 1);
    ++c, a = a + c + c, b = b + c;
  } else {
    Work((len >> 1) - 1);
    ++c, a = c + a + c + c, b = b + c;
  }
}
signed main() {
  scanf("%d", &n);
  Work(n);
  cout << b + a << ' ' << b;
}
