#include <bits/stdc++.h>
using namespace std;
long long gcd(long long n1, long long n2) {
  if (!n1) return n2;
  if (!n2) return n1;
  if (n1 % n2 == 0) return n2;
  return gcd(n2, n1 % n2);
}
long long powmod(long long base, long long exponent) {
  base %= 1000000007;
  long long ans = 1;
  while (exponent) {
    if (exponent & 1) ans = (ans * base) % 1000000007;
    base = (base * base) % 1000000007;
    exponent /= 2;
  }
  ans %= 1000000007;
  return ans;
}
string s[3];
int mxfreq[3];
int b[3];
int mx = 0, cntmx = 0;
map<char, int> cnt;
int main() {
  int n, i, j, k;
  scanf("%d", &n);
  for (i = 0; i < 3; i++) cin >> s[i];
  for (i = 0; i < 3; i++) {
    cnt.clear();
    for (j = 0; j < s[i].size(); j++) {
      cnt[s[i][j]]++;
      mxfreq[i] = max(mxfreq[i], cnt[s[i][j]]);
    }
  }
  for (i = 0; i < 3; i++) {
    if (mxfreq[i] == (int)s[i].size() && n == 1)
      b[i] = s[i].size() - 1;
    else
      b[i] = min((int)s[i].size(), mxfreq[i] + n);
    mx = max(mx, b[i]);
  }
  for (i = 0; i < 3; i++)
    if (mx == b[i]) cntmx++;
  if (cntmx > 1) {
    printf("Draw\n");
    return 0;
  }
  if (b[0] == mx) printf("Kuro\n");
  if (b[1] == mx) printf("Shiro\n");
  if (b[2] == mx) printf("Katie\n");
  return 0;
}
