#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n;
  cin >> n;
  string s;
  long long int final_length;
  long long int largest = -1, winner = -1;
  for (long long int i = 0; i < 3; i++) {
    map<char, long long int> M;
    cin >> s;
    for (long long int j = 0; j < s.length(); j++) {
      M[s[j]]++;
    }
    if (M.size() == 1) {
      if (n == 1)
        final_length = s.length() - 1;
      else
        final_length = s.length();
    } else {
      int max = 0;
      for (map<char, long long int>::iterator it = M.begin(); it != M.end();
           it++) {
        if (it->second > max) max = it->second;
      }
      if (n <= s.length() - max)
        final_length = max + n;
      else
        final_length = s.length();
    }
    if (final_length > largest) {
      largest = final_length;
      winner = i;
    } else if (final_length == largest) {
      winner = -1;
    }
  }
  if (winner == 0)
    cout << "Kuro";
  else if (winner == 1)
    cout << "Shiro";
  else if (winner == 2)
    cout << "Katie";
  else
    cout << "Draw";
  return 0;
}
