#include <bits/stdc++.h>
using namespace std;
map<char, int> getFreq(string s) {
  map<char, int> ret;
  for (int i = 0; i < s.size(); i++) {
    ret[s[i]]++;
  }
  return ret;
}
int mxFreq(map<char, int> mp) {
  int ret = 0;
  for (auto it = mp.begin(); it != mp.end(); it++) {
    ret = max(ret, it->second);
  }
  return ret;
}
int main() {
  int n;
  string a, b, c;
  cin >> n >> a >> b >> c;
  vector<map<char, int>> mp(3);
  mp[0] = getFreq(a);
  mp[1] = getFreq(b);
  mp[2] = getFreq(c);
  vector<pair<int, int>> v(3);
  for (int i = 0; i < 3; i++) {
    v[i].first = mxFreq(mp[i]);
    v[i].second = i;
    if (v[i].first == a.size() && n == 1)
      v[i].first = (int)a.size() - 1;
    else
      v[i].first = min((int)a.size(), v[i].first + n);
  }
  sort(v.begin(), v.end());
  reverse(v.begin(), v.end());
  int cnt = 0, mx = v[0].first;
  for (int i = 0; i < 3; i++) cnt += (v[i].first == mx);
  if (cnt > 1) return cout << "Draw" << endl, 0;
  string arr[] = {"Kuro", "Shiro", "Katie"};
  cout << arr[v[0].second] << endl;
}
