#include <bits/stdc++.h>
using namespace std;
map<long double, pair<long double, long double> > m1;
int main() {
  long long i, j, k, t, n;
  string str[3];
  cin >> n;
  for (i = 0; i < 3; i++) {
    cin >> str[i];
  }
  long long len = str[0].length();
  vector<pair<long long, string> > vect;
  vect.push_back(make_pair(0, "Kuro"));
  vect.push_back(make_pair(0, "Shiro"));
  vect.push_back(make_pair(0, "Katie"));
  long long max1 = 0;
  for (j = 0; j < 3; j++) {
    long long freq[128] = {0};
    for (i = 0; i < len; i++) {
      freq[str[j][i]]++;
    }
    vect[j].first = *max_element(freq, freq + 125);
    if ((*max_element(freq, freq + 125) == len) && (n == 1))
      vect[j].first = len - 1;
    else
      vect[j].first = min(len, n + *max_element(freq, freq + 125));
  }
  sort(vect.begin(), vect.end());
  if (vect[1].first == vect[2].first)
    cout << "Draw";
  else
    cout << vect[2].second;
  return 0;
}
