#include <bits/stdc++.h>
using namespace std;
int n, k;
string s[61], ans[61];
int main() {
  int i;
  for (i = 1; i <= 26; i++) {
    s[i] += "A";
    char c = i + 96;
    s[i] += c;
  }
  for (i = 27; i <= 53; i++) {
    s[i] += "B";
    char c = i + 96 - 26;
    s[i] += c;
  }
  scanf("%d%d", &n, &k);
  for (i = 1; i < k; i++) ans[i] = s[i];
  int flag = 1, pos = k, fg = k;
  for (i = 1; i <= n - k + 1; i++) {
    char c[5];
    scanf("%s", c);
    if (c[0] == 'Y')
      ans[pos++] = s[fg++];
    else
      ans[pos++] = ans[flag];
    flag++;
  }
  for (i = 1; i < n; i++) printf("%s ", ans[i].c_str());
  printf("%s\n", ans[n].c_str());
  return 0;
}
