#include <bits/stdc++.h>
using namespace std;
const int B = 317;
const int N = 4e3 + 7;
const long long mod = 998244353;
const int inf = 1e9 + 100;
int n;
int solve() {
  string s;
  cin >> s;
  map<int, int> m;
  int mx = 0;
  for (int i = 0; i < (int)s.size(); i++) {
    mx = max(mx, ++m[s[i]]);
  }
  if (n == 1 && mx == (int)s.size()) return mx - 1;
  return min((int)s.size(), mx + n);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  vector<int> v;
  v.push_back(solve());
  v.push_back(solve());
  v.push_back(solve());
  int mx = *max_element(v.begin(), v.end());
  for (int i = 1; i < 3; i++) {
    if (v[i] == mx && (v[i - 1] == v[i] || v[i] == v[0])) {
      cout << "Draw";
      return 0;
    }
  }
  if (v[0] == mx)
    cout << "Kuro";
  else if (v[1] == mx)
    cout << "Shiro";
  else
    cout << "Katie";
}
