#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int MAX = 5e3 + 5;
string s;
map<char, int> mmp;
pair<int, int> m[3];
int main() {
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  for (int i = 0; i < 3; ++i) {
    cin >> s;
    mmp.clear();
    int len = s.size();
    for (int j = 0; j < len; ++j) {
      mmp[s[j]]++;
      m[i].first = max(m[i].first, mmp[s[j]]);
    }
    m[i].second = i;
    if (m[i].first == len && n == 1)
      m[i].first--;
    else
      m[i].first = min(len, m[i].first + n);
  }
  sort(m, m + 3);
  if (m[1].first == m[2].first)
    cout << "Draw" << endl;
  else if (m[2].second == 0)
    cout << "Kuro" << endl;
  else if (m[2].second == 1)
    cout << "Shiro" << endl;
  else if (m[2].second == 2)
    cout << "Katie" << endl;
  return 0;
}
