#include <bits/stdc++.h>
using namespace std;
int ans[3];
int l[140] = {0};
char s[100004];
int main() {
  int r, i, j, len = 0;
  scanf("%d", &r);
  for (i = 0; i < 3; i++) {
    memset(l, 0, sizeof(l));
    scanf("%s", s);
    if (!len) len = strlen(s);
    for (j = 0; s[j]; j++) l[s[j]]++;
    int m = 0;
    for (j = 'A'; j <= 'z'; j++) {
      m = max(l[j], m);
    }
    if (r != 1)
      ans[i] = min(r + m, len);
    else
      ans[i] = m == len ? m - 1 : m + 1;
  }
  if (ans[0] > ans[1] && ans[0] > ans[2])
    cout << "Kuro" << endl;
  else if (ans[1] > ans[0] && ans[1] > ans[2])
    cout << "Shiro" << endl;
  else if (ans[2] > ans[1] && ans[2] > ans[0])
    cout << "Katie" << endl;
  else
    cout << "Draw" << endl;
  return 0;
}
