#include <bits/stdc++.h>
using namespace std;
string s;
vector<string> vec, v, res;
int main() {
  for (int i = 0; i < 26; i++)
    for (int j = 0; j < 26; j++) {
      string str = "";
      str += ('A' + i);
      str += ('a' + j);
      vec.push_back(str);
    }
  int n, k;
  cin >> n >> k;
  for (int i = 0; i < n - k + 1; i++) cin >> s, v.push_back(s);
  cerr << "HI\n";
  for (int i = 0; i < k - 1; i++) res.push_back(vec.back()), vec.pop_back();
  for (int i = k - 1, j = 0; i < n; i++, j++) {
    if (v[j] == "YES")
      res.push_back(vec.back()), vec.pop_back();
    else
      res.push_back(res[i - k + 1]);
  }
  for (int i = 0; i < n; i++) cout << res[i] << "\n";
  return 0;
}
