#include <bits/stdc++.h>
using namespace std;
int mod = 1e9 + 7;
const long long INF = 1ll << 60;
const int maxn = 1e6 + 10;
const int maxl = 2e3 + 10;
const double pi = acos(-1.0);
const double eps = 1e-8;
int n;
map<char, int> m[3];
string s[3];
pair<int, int> mo(int n, map<char, int> c) {
  multiset<int> se;
  for (auto& e : c) se.insert(e.second);
  int ma = 0;
  for (auto& e : c) {
    ma = max(ma, e.second);
  }
  se.erase(se.find(ma));
  int cnt = 0;
  int rec;
  while (1) {
    if (se.empty()) {
      assert(ma == s[0].length());
      break;
    }
    ++cnt;
    int u;
    for (auto& r : se) {
      ++ma;
      u = r;
      int nx = r - 1;
      if (nx) {
        se.insert(nx);
      }
      break;
    }
    se.erase(se.find(u));
    if (cnt == n) rec = ma;
  }
  return {cnt, rec};
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n;
  for (int t = (0); t < (3); ++t) {
    cin >> s[t];
    for (auto& c : s[t]) ++m[t][c];
  }
  int y[3];
  memset(y, 0, sizeof(y));
  if (!n) {
    for (int t = (0); t < (3); ++t) {
      for (auto& c : m[t]) y[t] = max(y[t], c.second);
    }
    goto N;
  }
  for (int t = (0); t < (3); ++t) {
    if (m[t].size() == 1) {
      if (n == 1)
        y[t] = s[t].length() - 1;
      else
        y[t] = s[t].length();
    } else {
      auto e = mo(n, m[t]);
      int &cnt = e.first, &rec = e.second;
      if (cnt <= n)
        y[t] = s[t].length();
      else
        y[t] = rec;
    }
  }
N:;
  multiset<int> se;
  for (int t = (0); t < (3); ++t) se.insert(y[t]);
  int ma = 0, id;
  for (int t = (0); t < (3); ++t) {
    if (y[t] > ma) ma = y[t], id = t;
  }
  if (se.count(ma) == 1) {
    switch (id) {
      case 0:
        cout << "Kuro";
        break;
      case 1:
        cout << "Shiro";
        break;
      case 2:
        cout << "Katie";
        break;
      default:
        assert(0);
    }
  } else {
    cout << "Draw";
  }
}
