#include <bits/stdc++.h>
using namespace std;
inline int in() {
  int x;
  scanf("%d", &x);
  return x;
}
inline void priv(vector<int> a) {
  for (int i = 0; i < ((int)(a).size()); ++i)
    printf("%d%c", a[i], i == (int)(a).size() - 1 ? '\n' : ' ');
}
template <typename T>
istream& operator>>(istream& i, vector<T>& v) {
  for (int j = 0; j < ((int)(v).size()); ++j) i >> v[j];
  return i;
}
template <typename T>
string join(vector<T>& v) {
  stringstream s;
  for (int i = 0; i < ((int)(v).size()); ++i) s << ' ' << v[i];
  return s.str().substr(1);
}
template <typename T>
ostream& operator<<(ostream& o, vector<T>& v) {
  if ((int)(v).size()) o << join(v);
  return o;
}
template <typename T1, typename T2>
istream& operator>>(istream& i, pair<T1, T2>& v) {
  return i >> v.first >> v.second;
}
template <typename T1, typename T2>
ostream& operator<<(ostream& o, pair<T1, T2>& v) {
  return o << v.first << "," << v.second;
}
const int MX = 100005, INF = 1001001001;
const long long int LINF = 1e18;
const double eps = 1e-10;
const string t = "FESTIVAL";
const int M = 20;
long long int dp[M][8];
int main() {
  long long int n;
  cin >> n;
  dp[0][0] = 1;
  for (int i = 1; i <= (M - 1); ++i) {
    for (int j = 0; j < (8); ++j) dp[i][j] = dp[i - 1][j];
    for (int j = 0; j < (7); ++j) {
      dp[i][j + 1] += dp[i][j];
    }
  }
  string ans;
  for (int i = (M)-1; i >= 0; --i)
    if (i) {
      long long int s = dp[i][7];
      while (n >= s) {
        ans += t[7];
        n -= s;
      }
      for (int j = (7) - 1; j >= 0; --j) ans += t[j];
    }
  reverse(ans.begin(), ans.end());
  cout << ans << " " << t << endl;
  return 0;
}
