#include <bits/stdc++.h>
using namespace std;
long long c[710], f[710];
inline long long C(int x, int y) {
  long double ret = 1;
  for (int i = 1; i <= x - y; i++) ret = ret * (i + y) / i;
  return (long long)(ret + 0.1);
}
int main() {
  long long k;
  cin >> k;
  for (int i = 1; i <= 700; i++) f[i] = C(i + 6, 7);
  for (int i = 700; i; i--) c[i] = k / f[i], k %= f[i];
  int t = 700;
  while (!c[t]) t--;
  for (int i = t; i; i--) cout << string(c[i], 'F') << "ESTIVAL";
  cout << endl << "FESTIVAL" << endl;
  return 0;
}
