#include <bits/stdc++.h>
using namespace std;
int in() {
  int n;
  scanf("%d", &n);
  return n;
}
long long Lin() {
  long long n;
  scanf("%lld", &n);
  return n;
}
double Din() {
  double n;
  scanf("%lf", &n);
  return n;
}
const double gama = 0.57721566490;
const double eps = 0.00000001;
const long long inf = 1e17;
const long long mod = 1e9 + 7;
const int N = 2e5 + 5;
int cal(string s, int n) {
  int sz = s.size();
  int a[55];
  for (int i = 0; i < 52; i++) a[i] = 0;
  for (int i = 0; s[i]; i++) {
    if (s[i] >= 'A' && s[i] <= 'Z')
      a[s[i] - 'A']++;
    else
      a[s[i] - 'a' + 26]++;
  }
  int mx = 0;
  for (int i = 0; i < 52; i++) mx = max(mx, a[i]);
  if (sz - mx >= n) return mx + n;
  if (n == 1) return sz - 1;
  return sz;
}
int main() {
  int n = in();
  string kuru, shiru, katie;
  cin >> kuru >> shiru >> katie;
  int a = cal(kuru, n), b = cal(shiru, n), c = cal(katie, n);
  if (a == b && a == c)
    printf("Draw\n");
  else 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;
}
