#include <bits/stdc++.h>
using namespace std;
const int A = 26;
int kk[A + A];
int solve(string &aa, int n, int k) {
  bool same = true;
  for (int i = 1; i < n; i++)
    if (aa[i] != aa[0]) {
      same = false;
      break;
    }
  if (same) return k == 1 ? n - 1 : n;
  fill(kk, kk + A + A, 0);
  for (int i = 0; i < n; i++) {
    char a = aa[i];
    if ('a' <= a && a <= 'z')
      kk[a - 'a']++;
    else
      kk[a - 'A' + A]++;
  }
  int ans = 0;
  for (int a = 0; a < A + A; a++) ans = max(ans, kk[a] + k);
  return min(ans, n);
}
int main() {
  int k;
  cin >> k;
  string aa, bb, cc;
  cin >> aa >> bb >> cc;
  int n = aa.length();
  int a = solve(aa, n, k);
  int b = solve(bb, n, k);
  int c = solve(cc, n, k);
  if (a > b && a > c)
    cout << "Kuro\n";
  else if (b > a && b > c)
    cout << "Shiro\n";
  else if (c > a && c > b)
    cout << "Katie\n";
  else
    cout << "Draw\n";
  return 0;
}
