#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n;
  cin >> n;
  string a, b, c;
  cin >> a >> b >> c;
  vector<long long int> sa(60, 0), sb(60, 0), sc(60, 0);
  for (auto it : a) sa[it - 'A']++;
  for (auto it : b) sb[it - 'A']++;
  for (auto it : c) sc[it - 'A']++;
  sort(sa.rbegin(), sa.rend());
  sort(sb.rbegin(), sb.rend());
  sort(sc.rbegin(), sc.rend());
  if (n == 1 and sa[0] == ((long long int)(a).size())) a.pop_back();
  if (n == 1 and sb[0] == ((long long int)(b).size())) b.pop_back();
  if (n == 1 and sc[0] == ((long long int)(c).size())) c.pop_back();
  long long x = min(((long long int)(a).size()), sa[0] + n);
  long long y = min(((long long int)(b).size()), sb[0] + n);
  long long z = min(((long long int)(c).size()), sc[0] + n);
  long long v = max({x, y, z});
  if (x == v and y != v and z != v)
    cout << "Kuro";
  else if (y == v and x != v and z != v)
    cout << "Shiro";
  else if (z == v and x != v and y != v)
    cout << "Katie";
  else
    cout << "Draw";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.precision(20);
  long long t = 1;
  while (t--) {
    solve();
    cout << "\n";
  }
  cin.get();
  return 0;
}
