#include <bits/stdc++.h>
using namespace std;
long long n;
int main() {
  cin >> n;
  string s1, s2, s3;
  cin >> s1 >> s2 >> s3;
  map<char, int> a, b, c;
  int maxa = 0, maxb = 0, maxc = 0;
  for (int i = 0; i < s1.length(); i++) {
    a[s1[i]]++;
    maxa = std::max(maxa, a[s1[i]]);
  }
  for (int i = 0; i < s2.length(); i++) {
    b[s2[i]]++;
    maxb = std::max(maxb, b[s2[i]]);
  }
  for (int i = 0; i < s3.length(); i++) {
    c[s3[i]]++;
    maxc = max(maxc, c[s3[i]]);
  }
  if (maxa == s1.length() && n == 1)
    maxa = s1.length() - 1;
  else
    maxa = min(maxa + n, (long long)s1.length());
  if (maxb == s2.length() && n == 1)
    maxb = s2.length() - 1;
  else
    maxb = min(maxb + n, (long long)s2.length());
  if (maxc == s3.length() && n == 1)
    maxc = s3.length() - 1;
  else
    maxc = min(maxc + n, (long long)s3.length());
  if (maxa > maxb && maxa > maxc) {
    cout << "Kuro" << endl;
  } else if (maxb > maxa && maxb > maxc) {
    cout << "Shiro" << endl;
  } else if (maxc > maxa && maxc > maxb) {
    cout << "Katie" << endl;
  } else
    cout << "Draw" << endl;
}
