#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7, INF = 9e18;
const int inf = 2e9;
vector<string> ans;
string f(int l, int r) {
  string s = "";
  for (int i = l; i <= r; i++) {
    s += (char)((int)'a' + i);
  }
  return s;
}
string f2(int l, int r) {
  string s = "";
  for (int i = l; i <= r; i++) {
    s += (char)((int)'a' + i);
    s += (char)((int)'a' + i);
  }
  return s;
}
int bits(int n) {
  int r = 0;
  while (n) {
    n >>= 1;
    r++;
  }
  return r;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n, b;
  cin >> n;
  ans.push_back(f(1, 19));
  int c = 0;
  while (n) {
    ans.push_back(f2(1, c));
    if (n % 3 == 1) {
      ans.push_back("a");
    }
    if (n % 3 == 2) {
      ans.push_back("aa");
    }
    c++;
    n /= 3;
  }
  string s = "";
  for (int i = ((int)ans.size()) - 1; i >= 0; i--) {
    s += ans[i];
  }
  cout << s;
  cout << " " << f(0, 19);
  return 0;
}
