#include <bits/stdc++.h>
using namespace std;
long long int beauty(string s, int n) {
  map<char, long long int> mp;
  long long int mx = -1;
  for (int i = 0; i < s.size(); i++) {
    mp[s[i]]++;
    mx = max(mx, mp[s[i]]);
  }
  if (s.size() == 1)
    return 1;
  else {
    mx += n;
    if (mx > s.size()) {
      if (n == 1)
        mx = s.size() - 1;
      else
        mx = s.size();
    }
    return mx;
  }
}
int main() {
  long long int n;
  cin >> n;
  string s1, s2, s3;
  cin >> s1 >> s2 >> s3;
  long long int b1, b2, b3;
  b1 = beauty(s1, n), b2 = beauty(s2, n), b3 = beauty(s3, n);
  if (b1 > b2 && b1 > b3)
    cout << "Kuro" << endl;
  else if (b2 > b1 && b2 > b3)
    cout << "Shiro" << endl;
  else if (b3 > b2 && b3 > b1)
    cout << "Katie" << endl;
  else
    cout << "Draw" << endl;
  return 0;
}
