#include <bits/stdc++.h>
using namespace std;
const int N = 100000 + 5;
int f[300], len;
int fun(char s[]) {
  memset(f, 0, sizeof(f));
  for (int i = 0; i < len; i++) f[s[i]]++;
  int max_ = 0;
  for (int i = 'A'; i <= 'Z'; i++) max_ = max(max_, f[i]);
  for (int i = 'a'; i <= 'z'; i++) max_ = max(max_, f[i]);
  return max_;
}
int check(int _max, long long n) {
  if (len == _max && n == 1) {
    _max--;
  } else {
    int val = len - _max;
    if (val <= n)
      _max = len;
    else if (val > n)
      _max += n;
  }
  return _max;
}
int main() {
  long long n;
  char s1[N], s2[N], s3[N];
  int max_1, max_2, max_3;
  scanf("%I64d", &n);
  scanf("%s %s %s", s1, s2, s3);
  len = strlen(s1);
  max_1 = check(fun(s1), n);
  max_2 = check(fun(s2), n);
  max_3 = check(fun(s3), n);
  if (max_1 > max_2 && max_1 > max_3)
    printf("Kuro\n");
  else if (max_2 > max_1 && max_2 > max_3)
    printf("Shiro\n");
  else if (max_3 > max_1 && max_3 > max_2)
    printf("Katie\n");
  else
    printf("Draw\n");
  return 0;
}
