#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, d, maxn[4] = {0};
  string a;
  cin >> n;
  for (int i = 1; i <= 3; i++) {
    map<char, int> q;
    q.clear();
    cin >> a;
    int m = 0, d = a.size();
    for (int j = 0; j < d; j++) {
      q[a[j]]++;
      m = max(m, q[a[j]]);
    }
    if (n + m <= d)
      maxn[i] = n + m;
    else {
      if (m == d && n == 1)
        maxn[i] = d - 1;
      else
        maxn[i] = d;
    }
  }
  int mm = *max_element(maxn + 1, maxn + 4);
  if ((maxn[1] == mm && maxn[2] == mm) || (maxn[1] == mm && maxn[3] == mm) ||
      (maxn[3] == mm) && (maxn[2] == mm)) {
    cout << "Draw" << endl;
    return 0;
  }
  for (int i = 1; i <= 3; i++) {
    if (mm == maxn[i]) {
      if (i == 1)
        cout << "Kuro" << endl;
      else if (i == 2)
        cout << "Shiro" << endl;
      else
        cout << "Katie" << endl;
      return 0;
    }
  }
  return 0;
}
