#include <bits/stdc++.h>
using namespace std;
int n;
pair<int, short> kq[3];
string s;
int a[250];
int main() {
  scanf("%d\n", &n);
  for (short i = 0; i < 3; ++i) {
    kq[i].second = i;
    getline(cin, s);
    int mx = 0, m = s.size();
    for (short j = 'a'; j <= 'z'; ++j) a[j] = 0;
    for (short j = 'A'; j <= 'Z'; ++j) a[j] = 0;
    for (int j = 0; j < m; ++j) a[s[j]]++;
    for (short j = 'a'; j <= 'z'; ++j) mx = max(mx, a[j]);
    for (short j = 'A'; j <= 'Z'; ++j) mx = max(mx, a[j]);
    if (mx == m && n == 1)
      kq[i].first = m - 1;
    else
      kq[i].first = min(m, mx + n);
  }
  sort(kq, kq + 3);
  if (kq[2].first == kq[1].first)
    printf("Draw");
  else {
    if (kq[2].second == 0) printf("Kuro");
    if (kq[2].second == 1) printf("Shiro");
    if (kq[2].second == 2) printf("Katie");
  }
  return 0;
}
