#include <bits/stdc++.h>
using namespace std;
int n;
string ku, sh, ka;
int k[500];
int shh[500];
int kaa[500];
int maku = 0;
int mash = 0;
int maka = 0;
int getM(string s) {
  memset(k, 0, sizeof k);
  int ma = 0;
  maku = 0;
  for (int i = 0; i < s.size(); i++) {
    k[s[i]]++;
  }
  for (int i = 0; i < 500; i++) {
    if (((char)i <= 'Z' && (char)i >= 'A') ||
        ((char)i <= 'z' && (char)i >= 'a')) {
      int rem1 = 0;
      if (k[i] == s.size()) {
        if (n == 1) {
          ma = max(ma, k[i] - 1);
        } else {
          ma = max(ma, k[i]);
        }
        continue;
      }
      if (k[i] + n > s.size()) {
        ma = max(ma, (int)s.size());
        continue;
      }
      maku = k[i];
      maku += n;
      ma = max(ma, maku);
    }
  }
  return ma;
}
int main() {
  cin >> n;
  cin >> ku >> sh >> ka;
  vector<pair<int, string> > v;
  v.push_back(make_pair(getM(ku), "Kuro"));
  v.push_back(make_pair(getM(sh), "Shiro"));
  v.push_back(make_pair(getM(ka), "Katie"));
  sort(v.begin(), v.end());
  if (v[2].first == v[1].first) {
    cout << "Draw" << endl;
  } else {
    cout << v[2].second << endl;
  }
}
