#include <bits/stdc++.h>
using namespace std;
string name[55];
int main() {
  for (int i = 0; i < 52; ++i) {
    if (i < 26)
      name[i] = 'A' + i;
    else
      name[i] = name[i - 26] + 'a';
  }
  int n, k;
  int nameid = 0;
  string outname[55];
  string op[55];
  while (~scanf("%d%d", &n, &k)) {
    for (int i = 0; i < n - k + 1; ++i) {
      cin >> op[i];
    }
    for (int i = n - 1; i >= 0; --i) {
      if (n - i < k)
        outname[i] = name[nameid++];
      else {
        if (op[i][0] == 'Y') {
          outname[i] = name[nameid++];
        } else {
          outname[i] = outname[i + k - 1];
        }
      }
    }
    for (int i = 0; i < n - 1; ++i) {
      cout << outname[i] << " ";
    }
    cout << outname[n - 1] << endl;
  }
  return 0;
}
