#include <bits/stdc++.h>
using namespace std;
double PI = 3.14159265358979323846;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout << "a" << endl;
  int x1, x2, x3, x;
  cin >> x;
  if (x == 0) return 0;
  string s = "";
  for (int i = 0; i < x; i++) s += 'b';
  cout << s << endl;
  cin >> x1;
  if (x1 == 0) return 0;
  int sz = x + 1;
  int lefta = x1;
  string ans = "";
  for (int i = 0; i < x + 1; i++) {
    s = ans;
    if (lefta > 0) {
      s += "a";
      while (s.size() < sz) {
        s += "b";
      }
    } else {
      while (s.size() < sz) {
        s += "b";
      }
    }
    cout << s << endl;
    int y;
    cin >> y;
    if (y == 0) return 0;
    if (y == lefta - 1) {
      ans += "a";
      lefta--;
    } else {
      ans += "b";
    }
  }
  return 0;
}
