#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using pi = pair<int, int>;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int opt;
  cin >> opt;
  string str[5];
  bool isDraw = false;
  int totmax = -1, totid = -1;
  for (int i = (1); i <= (3); ++i) {
    int cnt[60];
    memset((cnt), 0, sizeof(cnt));
    cin >> str[i];
    int maxidx = -1, maxc = -1;
    for (int j = (0); j <= (str[i].length() - 1); ++j) {
      cnt[str[i][j] - 'A']++;
      if (maxc < cnt[str[i][j] - 'A']) {
        maxidx = str[i][j] - 'A';
        maxc = cnt[str[i][j] - 'A'];
      }
    }
    int nowmax = min(maxc + opt, (int)str[i].length());
    if (maxc + opt > str[i].length() && opt == 1) nowmax--;
    if (nowmax > totmax) {
      totmax = nowmax;
      totid = i;
      isDraw = false;
    } else if (nowmax == totmax) {
      isDraw = true;
    }
  }
  string ans[] = {"Kuro", "Shiro", "Katie"};
  if (isDraw)
    cout << "Draw" << endl;
  else
    cout << ans[totid - 1] << endl;
  return 0;
}
