#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  ;
  long long n;
  cin >> n;
  string str[3];
  for (long long i = 0; i < 3; i++) cin >> str[i];
  long long maxfreq;
  long long cnt[1000];
  long long ans[3];
  for (long long i = 0; i < 3; i++) {
    memset(cnt, 0, sizeof cnt);
    ;
    long long len = str[i].length();
    maxfreq = -1;
    for (long long j = 0; j < len; j++) {
      cnt[str[i][j]]++;
      maxfreq = max(maxfreq, cnt[str[i][j]]);
    }
    long long temp = n;
    long long k = len - maxfreq;
    if (k >= temp)
      ans[i] = maxfreq + n;
    else {
      if (n == 1 && maxfreq == len) {
        ans[i] = len - 1;
        continue;
      }
      if ((temp - len) % 2 == 0 || (temp - len + 1) % 2 == 0 ||
          (temp - k) % 2 == 0)
        ans[i] = len;
      else
        ans[i] = len - 1;
    }
  }
  long long maxi = max(ans[0], max(ans[1], ans[2]));
  long long c = 0;
  for (long long i = 0; i < 3; i++) {
    if (maxi == ans[i]) c++;
  }
  if (c > 1) {
    cout << "Draw" << endl;
    return 0;
  }
  if (maxi == ans[0]) {
    cout << "Kuro" << endl;
  } else if (maxi == ans[1]) {
    cout << "Shiro" << endl;
  } else {
    cout << "Katie" << endl;
  }
}
