#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n;
  cin >> n;
  string s;
  int k = 3;
  vector<long long> max_letter;
  while (k--) {
    cin >> s;
    unordered_map<char, long long> m;
    for (long long i = 0; i < (int)s.size(); i++) {
      m[s[i]]++;
    }
    long long max_beauty = -1;
    for (auto x : m) {
      if (x.second > max_beauty) {
        max_beauty = x.second;
      }
    }
    if (n == 1 && max_beauty == (int)s.size()) s.pop_back();
    if (max_beauty + n <= (int)s.size())
      max_beauty = max_beauty + n;
    else
      max_beauty = s.size();
    max_letter.push_back(max_beauty);
  }
  if (max_letter[0] > max_letter[1] && max_letter[0] > max_letter[2]) {
    cout << "Kuro\n";
  } else if (max_letter[0] < max_letter[1] && max_letter[1] > max_letter[2]) {
    cout << "Shiro\n";
  } else if (max_letter[2] > max_letter[1] && max_letter[0] < max_letter[2]) {
    cout << "Katie\n";
  } else if (max_letter[2] == max_letter[1] || max_letter[0] == max_letter[2] ||
             max_letter[0] == max_letter[1]) {
    cout << "Draw\n";
  } else {
    cout << "Draw\n";
  }
  return 0;
}
