#include <bits/stdc++.h>
int cnt[60];
int maxn[3];
int num[3];
int main() {
  int n;
  scanf("%d", &n);
  char c = getchar();
  for (int i = 0; i < 3; i++) {
    for (int i = 0; i < 52; i++) cnt[i] = 0;
    maxn[i] = 0;
    c = getchar();
    while (c != '\n') {
      num[i]++;
      if (c >= 'a' && c <= 'z')
        cnt[c - 'a']++;
      else
        cnt[c - 'A' + 26]++;
      c = getchar();
    }
    for (int j = 0; j < 52; j++)
      if (cnt[j] > maxn[i]) maxn[i] = cnt[j];
  }
  for (int i = 0; i < 3; i++)
    if (maxn[i] == num[i] && n == 1)
      maxn[i]--;
    else if (maxn[i] + n <= num[i])
      maxn[i] += n;
    else
      maxn[i] = num[i];
  int maxx = maxn[0];
  if (maxn[1] > maxx) maxx = maxn[1];
  if (maxn[2] > maxx) maxx = maxn[2];
  if (maxx == maxn[0] && maxx > maxn[1] && maxx > maxn[2])
    printf("Kuro\n");
  else if (maxx == maxn[1] && maxx > maxn[0] && maxx > maxn[2])
    printf("Shiro\n");
  else if (maxx == maxn[2] && maxx > maxn[0] && maxx > maxn[1])
    printf("Katie\n");
  else
    printf("Draw\n");
}
