#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  int n;
  cin >> n;
  string s[3];
  cin >> s[0] >> s[1] >> s[2];
  map<char, int> m[3];
  int score = -1;
  int winner = -1;
  bool draw = 0;
  for (int i = 0; i < 3; i++) {
    for (int j = 0; j < (int)s[i].size(); j++) m[i][s[i][j]]++;
    int maxi = -1;
    for (auto it : m[i])
      if (it.second > maxi) maxi = it.second;
    int tmp =
        min((int)s[i].size() - (int)((m[i].size() == 1) && (n == 1)), maxi + n);
    if (tmp == score) {
      draw = 1;
    }
    if (tmp > score) {
      score = tmp;
      winner = i;
      draw = 0;
    }
  }
  if (draw) {
    cout << "Draw";
    return 0;
  }
  switch (winner) {
    case 0:
      cout << "Kuro";
      break;
    case 1:
      cout << "Shiro";
      break;
    case 2:
      cout << "Katie";
      break;
  }
  return 0;
}
