#include <bits/stdc++.h>
#pragma warning(disable : 4996)
#pragma comment(linker, "/STACK:336777216")
using namespace std;
int IT_MAX = 1 << 18;
const long long MOD = 1000000007;
const int INF = 0x3f3f3f3f;
const long long LL_INF = 0x3f3f3f3f3f3f3f3f;
const double PI = acos(-1);
const double ERR = 1e-10;
char u[100050];
int cnt[52];
int ch(char c) {
  if (c >= 'a' && c <= 'z') return c - 'a';
  return c - 'A' + 26;
}
int getans(int N) {
  scanf("%s", u);
  int i, L = strlen(u);
  for (i = 0; i < 52; i++) cnt[i] = 0;
  for (i = 0; i < L; i++) cnt[ch(u[i])]++;
  if (L == 1) return 1;
  int mx = 0;
  for (i = 0; i < 52; i++) mx = max(mx, cnt[i]);
  if (mx == L) {
    if (N == 1)
      return mx - 1;
    else
      return mx;
  }
  return min(L, mx + N);
}
int main() {
  int N, i;
  scanf("%d", &N);
  int v[3];
  v[0] = getans(N);
  v[1] = getans(N);
  v[2] = getans(N);
  int mx = max(max(v[0], v[1]), v[2]);
  int c = 0;
  for (i = 0; i < 3; i++)
    if (v[i] == mx) c++;
  if (c >= 2) return !printf("Draw\n");
  if (v[0] == mx) printf("Kuro\n");
  if (v[1] == mx) printf("Shiro\n");
  if (v[2] == mx) printf("Katie\n");
  return 0;
}
