#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, ans[5], mm = 0;
  scanf("%d", &n);
  for (int i = 0; i < 3; i++) ans[i] = get_ans(n), mm = max(mm, ans[i]);
  int cnt = 0;
  for (int i = 0; i < 3; i++)
    if (ans[i] == mm) cnt++;
  if (cnt >= 2)
    puts("Draw");
  else {
    if (mm == ans[0]) puts("Kuro");
    if (mm == ans[1]) puts("Shiro");
    if (mm == ans[2]) puts("Katie");
  }
}
