#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const long long LINF = 0x3f3f3f3f3f3f3f3f;
const int MOD = (int)1e9 + 7;
const int N = (int)2e6 + 7;
const int M = (int)-1;
int a, n;
int cnt[N];
void out() {
  for (int i = (0); i < (a); ++i) {
    for (int j = (0); j < (cnt[i]); ++j) cout << 'b';
    cout << 'a';
  }
  for (int j = (0); j < (cnt[a]); ++j) cout << 'b';
  cout << endl;
}
int gao(int k) {
  cnt[k]++;
  out();
  cnt[k]--;
  int t;
  cin >> t;
  return t;
}
int main() {
  cout << 'a' << endl;
  cin >> n;
  if (n == 0) return 0;
  for (int i = (0); i < (n); ++i) cout << 'b';
  cout << endl;
  cin >> a;
  if (a == 0) return 0;
  n++;
  if (n == a) {
    for (int i = (0); i < (n); ++i) cout << 'a';
    cout << endl;
    int t;
    cin >> t;
    return 0;
  }
  int s = a;
  for (int i = (0); i < (a); ++i) {
    while (s < n && gao(i) == n - s - 1) {
      s++;
      cnt[i]++;
    }
  }
  cnt[a] = n - s;
  if (n > s) {
    out();
    int t;
    cin >> t;
  }
  return 0;
}
