#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cout << "a\n";
  cout.flush();
  int len;
  cin >> len;
  if (len == 0) return 0;
  char b[len + 1];
  for (int i = 0; i < len; i++) b[i] = 'b';
  b[len] = '\0';
  int fin_len;
  cout << b << "\n";
  cout.flush();
  cin >> fin_len;
  if (fin_len == 0) return 0;
  char fin[len + 2];
  for (int i = 0; i <= len; i++) fin[i] = 'b';
  fin[len + 1] = '\0';
  int no_a = fin_len;
  fin[0] = 'a';
  int i = 0;
  int tmp;
  while (true) {
    cout << fin << "\n";
    cout.flush();
    cin >> tmp;
    if (tmp == 0) return 0;
    if (fin_len > tmp) {
      i++;
      fin[i] = 'a';
      fin_len = tmp;
    } else {
      fin[i++] = 'b';
      fin[i] = 'a';
    }
  }
}
