#include <bits/stdc++.h>
using namespace std;
const int MAX = 1e5 + 50;
char s[MAX];
int rec[100];
int f(char c) {
  if (islower(c)) return c - 'a' + 1;
  return c - 'A' + 27;
}
int getans(int n) {
  scanf("%s", s);
  ;
  int len = strlen(s);
  if (len == 1) return 1;
  memset(rec, 0, sizeof(rec));
  for (int i = 0; i <= len - 1; ++i) rec[f(s[i])]++;
  int mx = 0;
  for (int i = 1; i <= 52; ++i) mx = max(mx, rec[i]);
  if (mx == len) {
    if (n == 1)
      return mx - 1;
    else
      return mx;
  }
  return min(len, mx + n);
}
int main() {
  int n;
  scanf("%d", &n);
  int a = getans(n);
  int b = getans(n);
  int c = getans(n);
  if (a > b && a > c)
    puts("Kuro");
  else if (b > a && b > c)
    puts("Shiro");
  else if (c > a && c > b)
    puts("Katie");
  else
    puts("Draw");
  return 0;
}
