#include <bits/stdc++.h>
using namespace std;
const int M = 1e5 + 50;
int ch(char a) {
  if (a == tolower(a))
    return a - 'a';
  else
    return a - 'A' + 26;
}
int get_ans(int n) {
  char s[M];
  scanf("%s", s);
  int cnt[52], mm = 0, len = strlen(s);
  memset(cnt, 0, sizeof(cnt));
  for (int i = 0; i < len; i++) cnt[ch(s[i])]++, mm = max(mm, cnt[ch(s[i])]);
  if (len == 1) return 1;
  if (mm == len) {
    if (n == 1)
      return mm - 1;
    else
      return mm;
  }
  return min(len, mm + n);
}
int main() {
  int N, i;
  scanf("%d", &N);
  int v[3];
  v[0] = get_ans(N);
  v[1] = get_ans(N);
  v[2] = get_ans(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;
}
