#include <bits/stdc++.h>
using namespace std;
string a, b, c;
map<char, int> mp;
int ansa, ansb, ansc, len, n;
int main() {
  cin >> n;
  cin >> a >> b >> c;
  map<char, int>::iterator it;
  mp.clear();
  for (int i = 0; i < (int)a.size(); ++i) mp[a[i]]++;
  for (it = mp.begin(); it != mp.end(); ++it) {
    ansa = max(ansa, it->second);
  }
  mp.clear();
  for (int i = 0; i < (int)b.size(); ++i) mp[b[i]]++;
  for (it = mp.begin(); it != mp.end(); ++it) {
    ansb = max(ansb, it->second);
  }
  mp.clear();
  for (int i = 0; i < (int)c.size(); ++i) mp[c[i]]++;
  for (it = mp.begin(); it != mp.end(); ++it) {
    ansc = max(ansc, it->second);
  }
  len = a.size();
  if (ansa + n <= len) {
    ansa = ansa + n;
  } else {
    ansa = len - (((ansa == len)) && (ansa + n - len) == 1);
  }
  if (ansb + n <= len) {
    ansb = ansb + n;
  } else {
    ansb = len - ((ansb == len) && (ansb + n - len) == 1);
  }
  if (ansc + n <= len) {
    ansc = ansc + n;
  } else {
    ansc = len - ((ansc == len) && (ansc + n - len) == 1);
  }
  int top = ansa;
  int ans = 1;
  if (ansb > top) {
    top = ansb;
    ans = 2;
  }
  if (ansc > top) {
    top = ansc;
    ans = 3;
  }
  int cnt = 0;
  if (top == ansa) ++cnt;
  if (top == ansb) ++cnt;
  if (top == ansc) ++cnt;
  if (cnt == 1) {
    switch (ans) {
      case (1):
        puts("Kuro");
        break;
      case (2):
        puts("Shiro");
        break;
      default:
        puts("Katie");
        break;
    }
  } else {
    puts("Draw");
  }
}
