#include <bits/stdc++.h>
using namespace std;
long long seek(map<char, long long> m, long long n, long long len) {
  long long ret = 0;
  for (auto i : m) {
    long long res = len - i.second;
    if (res > n) {
      ret = max(ret, i.second + n);
      continue;
    }
    long long less = n - res;
    if (i.second == len && n == 1)
      ret = max(ret, len - 1);
    else
      ret = max(ret, len);
  }
  return ret;
}
string a, b, c;
map<char, long long> mp[5];
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n >> a >> b >> c;
  for (auto i : a) mp[0][i]++;
  for (auto i : b) mp[1][i]++;
  for (auto i : c) mp[2][i]++;
  long long a1 = seek(mp[0], n, (long long)a.size());
  long long a2 = seek(mp[1], n, (long long)b.size());
  long long a3 = seek(mp[2], n, (long long)c.size());
  if (a1 > a3 && a1 > a2)
    cout << "Kuro" << endl;
  else if (a2 > a3 && a2 > a1)
    cout << "Shiro" << endl;
  else if (a3 > a1 && a3 > a2)
    cout << "Katie" << endl;
  else
    cout << "Draw" << endl;
  return 0;
}
