#include <bits/stdc++.h>
using namespace std;
int main() {
  long n;
  cin >> n;
  string k, s, ka;
  cin >> k >> s >> ka;
  int l1 = k.length(), l2 = s.length(), l3 = ka.length();
  int ma = 0, mb = 0, mc = 0;
  vector<int> a(256, 0), b(256, 0), c(256, 0);
  for (char x : k) {
    ma = max(ma, ++a[x]);
  }
  for (char x : s) {
    mb = max(mb, ++b[x]);
  }
  for (char x : ka) {
    mc = max(mc, ++c[x]);
  }
  if (n == 1 && ma == l1) k.pop_back();
  if (n == 1 && mb == l2) s.pop_back();
  if (n == 1 && mc == l3) ka.pop_back();
  ma = min(ma + n, (long)k.length());
  mb = min(mb + n, (long)s.length());
  mc = min(mc + n, (long)ka.length());
  if (ma > mb && ma > mc) {
    cout << "Kuro";
  } else if (mb > ma && mb > mc) {
    cout << "Shiro";
  } else if (mc > ma && mc > mb) {
    cout << "Katie";
  } else {
    cout << "Draw";
  }
  return 0;
}
