#include <bits/stdc++.h>
using namespace std;
int ASCII[255];
int main() {
  int n;
  char str1[100005], str2[100005], str3[100005];
  int A, B, C;
  while (scanf("%d", &n) != EOF) {
    A = B = C = 0;
    scanf("%s%s%s", str1, str2, str3);
    int len = strlen(str1);
    memset(ASCII, 0, sizeof(ASCII));
    for (int i = 0; str1[i]; i++) ASCII[str1[i]]++;
    for (int i = 'a'; i <= 'z'; i++) A = max(A, ASCII[i]);
    for (int i = 'A'; i <= 'Z'; i++) A = max(A, ASCII[i]);
    if (A == len) {
      A -= (n == 1);
    } else {
      A = min(A + n, len);
    }
    memset(ASCII, 0, sizeof(ASCII));
    for (int i = 0; str2[i]; i++) ASCII[str2[i]]++;
    for (int i = 'a'; i <= 'z'; i++) B = max(B, ASCII[i]);
    for (int i = 'A'; i <= 'Z'; i++) B = max(B, ASCII[i]);
    if (B == len) {
      B -= (n == 1);
    } else {
      B = min(B + n, len);
    }
    memset(ASCII, 0, sizeof(ASCII));
    for (int i = 0; str3[i]; i++) ASCII[str3[i]]++;
    for (int i = 'a'; i <= 'z'; i++) C = max(C, ASCII[i]);
    for (int i = 'A'; i <= 'Z'; i++) C = max(C, ASCII[i]);
    if (C == len) {
      C -= (n == 1);
    } else {
      C = min(C + n, len);
    }
    if (A > B && A > C) {
      printf("Kuro\n");
    } else if (B > A && B > C) {
      printf("Shiro\n");
    } else if (C > A && C > B) {
      printf("Katie\n");
    } else
      printf("Draw\n");
  }
  return 0;
}
