#include <bits/stdc++.h>
using namespace std;
int n;
int a[200], b[200], c[200];
int max_a = 0, max_b = 0, max_c = 0;
string ku, sh, ka;
void ReadInput() {
  cin >> n;
  cin >> ku >> sh >> ka;
  fill(begin(a), end(a), 0);
  fill(begin(b), end(b), 0);
  fill(begin(c), end(c), 0);
}
void Solve() {
  for (char ch : ku) max_a = max(max_a, ++a[ch - 'A']);
  for (char ch : sh) max_b = max(max_b, ++b[ch - 'A']);
  for (char ch : ka) max_c = max(max_c, ++c[ch - 'A']);
  if (n == 1) {
    if (max_a == (int)ku.size()) ku.pop_back();
    if (max_b == (int)sh.size()) sh.pop_back();
    if (max_c == (int)ka.size()) ka.pop_back();
  }
  max_a = min(max_a + n, (int)ku.size());
  max_b = min(max_b + n, (int)sh.size());
  max_c = min(max_c + n, (int)ka.size());
  if (max_a > max(max_b, max_c)) {
    cout << "Kuro";
    return;
  }
  if (max_b > max(max_a, max_c)) {
    cout << "Shiro";
    return;
  }
  if (max_c > max(max_a, max_b)) {
    cout << "Katie";
    return;
  }
  cout << "Draw";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  ReadInput();
  Solve();
}
