#include <bits/stdc++.h>
using namespace std;
inline int Int() {
  int x;
  scanf("%d", &x);
  return x;
}
inline long Long() {
  long x;
  scanf("%ld", &x);
  return x;
}
inline long long LLong() {
  long long x;
  scanf("%lld", &x);
  return x;
}
inline float Float() {
  float x;
  scanf("%f", &x);
  return x;
}
inline float Double() {
  double x;
  scanf("%lf", &x);
  return x;
}
inline pair<int, int> Pair() {
  pair<int, int> p;
  scanf("d", &p.first, &p.second);
  return p;
}
void S(char *x) { scanf("%s", x); }
void pI(int x) { printf("%d", x); }
void pL(long x) { printf("%ld", x); }
void pLL(long long x) { printf("%lld", x); }
void pUL(unsigned long long x) { printf("%llu", x); }
void pF(float x) { printf("%f", x); }
void pD(double x) { printf("%f", x); }
void pS(char x[]) { printf("%s", x); }
const double PI = acos(-1.0);
const double EPS = 1e-6;
const int MOD = (int)1e9 + 7;
const int maxn = (int)1e5 + 5;
int cnt[5][60], mx[5];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n, len;
  string s[5];
  cin >> n;
  for (int i = 1; i <= (3); i++) {
    cin >> s[i];
    len = s[i].length();
    for (int j = 0; j < (len); j++) {
      int p;
      char c = s[i][j];
      if (isupper(c))
        p = c - 'A' + 26;
      else
        p = c - 'a';
      cnt[i][p]++;
      mx[i] = max(mx[i], cnt[i][p]);
    }
    if (mx[i] == len && n == 1)
      mx[i] = len - 1;
    else if (mx[i] + n >= len)
      mx[i] = len;
    else if (mx[i] + n < len)
      mx[i] = mx[i] + n;
  }
  if (mx[1] > mx[2] && mx[1] > mx[3])
    cout << "Kuro\n";
  else if (mx[2] > mx[1] && mx[2] > mx[3])
    cout << "Shiro\n";
  else if (mx[3] > mx[2] && mx[3] > mx[1])
    cout << "Katie\n";
  else
    cout << "Draw\n";
  return 0;
}
