#include <bits/stdc++.h>
using namespace std;
int n, c[256], s[4];
char str[1000005];
int main() {
  cin >> n;
  int j, l, t;
  for (int i = 1; i <= 3; i++) {
    cin >> str;
    memset(c, 0, sizeof(c));
    for (j = 0; str[j]; j++) c[str[j]]++;
    for (t = 0, j = 1; j <= 200; j++) {
      t = max(t, c[j]);
    }
    l = strlen(str);
    if (t == l && n == 1)
      s[i] = l - 1;
    else
      s[i] = min(t + n, (int)strlen(str));
  }
  if (s[1] > s[2] && s[1] > s[3])
    cout << "Kuro" << endl;
  else if (s[2] > s[1] && s[2] > s[3])
    cout << "Shiro" << endl;
  else if (s[3] > s[1] && s[3] > s[2])
    cout << "Katie" << endl;
  else
    cout << "Draw" << endl;
}
