#include <bits/stdc++.h>
const long long N = 1e6;
using namespace std;
int query(string s) {
  cout << s << endl;
  fflush(stdout);
  int n;
  cin >> n;
  return n;
}
string gena(int n) {
  string s;
  for (int i = 0; i < n; i++) s += 'a';
  return s;
}
string genb(int n) {
  string s;
  for (int i = 0; i < n; i++) s += 'b';
  return s;
}
int main() {
  int n = query("a") + 1;
  if (n == 1) return 0;
  if (n == 301) {
    query(genb(n - 1));
    return 0;
  }
  int cntb = query(gena(n));
  if (cntb == 0) return 0;
  if (cntb == n) {
    query(genb(n - 1));
    return 0;
  }
  int cnta = n - cntb;
  string cur;
  for (int i = 0; i < cnta; i++) {
    while (true) {
      int ans = query(cur + "b" + gena(cnta - i));
      if (ans <= 0) return 0;
      if (ans != n - (cur.size() + 1 + cnta - i)) break;
      cur += "b";
    }
    cur += "a";
  }
  int len = n - cur.size();
  query(cur + genb(len));
}
