#include <bits/stdc++.h>
using namespace std;
bool less_vectors(const vector<long long>& a, const vector<long long>& b) {
  return a.size() < b.size();
}
vector<vector<long long> > bit(26, vector<long long>((1 << 19) + 1, 0));
long long mm = (1 << 19);
void update(long long j, long long k) {
  while (k <= mm) {
    bit[j][k]++;
    k += (k & -k);
  }
}
long long query(long long j, long long k) {
  long long ans = 0;
  while (k) {
    ans += bit[j][k];
    k -= (k & -k);
  }
  return ans;
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long n;
  cin >> n;
  string s1, s2, s3;
  cin >> s1 >> s2 >> s3;
  long long f1, f2, f3;
  f1 = f2 = f3 = 0;
  map<char, long long> m1;
  long long n1 = s1.length();
  long long n2 = s2.length();
  long long n3 = s3.length();
  for (long long i = 0; i < s1.length(); i++) {
    m1[s1[i]]++;
    f1 = max(f1, m1[s1[i]]);
  }
  if (f1 + n <= n1)
    f1 = f1 + n;
  else {
    if (f1 == n1) {
      if (n != 1)
        f1 = n1;
      else
        f1 = n1 - 1;
    } else
      f1 = n1;
  }
  map<char, long long> m2;
  for (long long i = 0; i < s2.length(); i++) {
    m2[s2[i]]++;
    f2 = max(f2, m2[s2[i]]);
  }
  if (f2 + n <= n2)
    f2 = f2 + n;
  else {
    if (f2 == n2) {
      if (n != 1)
        f2 = n2;
      else
        f2 = n2 - 1;
    } else
      f2 = n2;
  }
  map<char, long long> m3;
  for (long long i = 0; i < s3.length(); i++) {
    m3[s3[i]]++;
    f3 = max(f3, m3[s3[i]]);
  }
  if (f3 + n <= n3)
    f3 = f3 + n;
  else {
    if (f3 == n3) {
      if (n != 1)
        f3 = n3;
      else
        f3 = n3 - 1;
    } else
      f3 = n3;
  }
  if (f1 > f2 && f1 > f3)
    cout << "Kuro";
  else if (f2 > f1 && f2 > f3)
    cout << "Shiro";
  else if (f3 > f1 && f3 > f2)
    cout << "Katie";
  else
    cout << "Draw";
  return 0;
}
