#include <bits/stdc++.h>
using namespace std;
map<char, long long> A, B, C;
bool chck(int a, int b, int c) {
  int mx = 0;
  mx = max(mx, a);
  mx = max(mx, b);
  mx = max(mx, c);
  if (a == b && mx == a) return 1;
  if (b == c && mx == b) return 1;
  if (c == a && mx == a) return 1;
  return 0;
}
bool same(string s) {
  set<char> S;
  for (int i = 0; i < s.size(); i++) S.insert(s[i]);
  return S.size() == 1;
}
int main() {
  long long n, la, lb, lc, ax, bx, cx;
  cin >> n;
  string a, b, c;
  cin >> a >> b >> c;
  la = a.length();
  lb = b.length();
  lc = c.length();
  for (int i = 0; i < la; i++) A[a[i]]++;
  for (int i = 0; i < lb; i++) B[b[i]]++;
  for (int i = 0; i < lc; i++) C[c[i]]++;
  map<char, long long>::iterator it;
  ax = bx = cx = 0;
  for (it = A.begin(); it != A.end(); it++) ax = max(ax, it->second);
  for (it = B.begin(); it != B.end(); it++) bx = max(bx, it->second);
  for (it = C.begin(); it != C.end(); it++) cx = max(cx, it->second);
  ax += min(la - ax, n);
  bx += min(lb - bx, n);
  cx += min(lc - cx, n);
  if (n == 1) {
    if (ax == la && same(a)) ax--;
    if (bx == lb && same(b)) bx--;
    if (cx == lc && same(c)) cx--;
  }
  if (chck(ax, bx, cx))
    cout << "Draw";
  else if (ax > bx && ax > cx)
    cout << "Kuro";
  else if (bx > ax && bx > cx)
    cout << "Shiro";
  else if (cx > ax && cx > bx)
    cout << "Katie";
  return 0;
}
