#include <bits/stdc++.h>
using namespace std;
void solve();
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int t = 1;
  while (t--) solve();
  return 0;
}
void solve() {
  long long int i, j;
  long long int n;
  cin >> n;
  string s[3];
  map<long long int, string> st;
  st[0] = "Kuro";
  st[1] = "Shiro";
  st[2] = "Katie";
  for (i = 0; i < 3; i++) {
    cin >> s[i];
  }
  long long int l = s[0].length();
  long long int f[3][256] = {0};
  for (i = 0; i < 3; i++) {
    for (auto it : s[i]) {
      f[i][(long long int)it]++;
    }
  }
  vector<long long int> mx(3);
  long long int Max;
  for (i = 0; i < 3; i++) {
    Max = -1;
    for (j = 0; j < 128; j++) {
      Max = max(Max, f[i][j]);
    }
    mx[i] = Max;
  }
  if (n == 1 && mx[0] == l) s[0].pop_back();
  if (n == 1 && mx[1] == l) s[1].pop_back();
  if (n == 1 && mx[2] == l) s[2].pop_back();
  mx[0] = min(mx[0] + n, (long long int)s[0].length());
  mx[1] = min(mx[1] + n, (long long int)s[1].length());
  mx[2] = min(mx[2] + n, (long long int)s[2].length());
  if (mx[0] > mx[1] && mx[0] > mx[2]) {
    cout << st[0] << "\n";
  } else if (mx[1] > mx[2] && mx[1] > mx[0]) {
    cout << st[1] << "\n";
  } else if (mx[2] > mx[0] && mx[2] > mx[1]) {
    cout << st[2] << "\n";
  } else {
    cout << "Draw"
         << "\n";
  }
}
