#include <bits/stdc++.h>
using namespace std;
const int INF = 1000000005;
const double eps = 1e-9;
int main() {
  int n;
  cin >> n;
  string s1, s2, s3;
  cin >> s1 >> s2 >> s3;
  map<char, int> m1, m2, m3;
  int size = s1.size();
  for (int i = 0; i < size; i++) {
    m1[s1[i]]++;
    m2[s2[i]]++;
    m3[s3[i]]++;
  }
  int res1 = 0, res2 = 0, res3 = 0;
  for (auto e : m1) {
    int es = e.second;
    if (es + n > size) {
      if (es == size && n == 1) {
        res1 = max(res1, size - 1);
      } else
        res1 = max(res1, size);
    } else {
      res1 = max(res1, es + n);
    }
    res1 = max(res1, 1);
  }
  for (auto e : m2) {
    int es = e.second;
    if (es + n > size) {
      if (es == size && n == 1) {
        res2 = max(res2, size - 1);
      } else
        res2 = max(res2, size);
    } else {
      res2 = max(res2, es + n);
    }
    res2 = max(res2, 1);
  }
  for (auto e : m3) {
    int es = e.second;
    if (es + n > size) {
      if (es == size && n == 1) {
        res3 = max(res3, size - 1);
      } else
        res3 = max(res3, size);
    } else {
      res3 = max(res3, es + n);
    }
    res3 = max(res3, 1);
  }
  if (res1 > res2 && res1 > res3) {
    cout << "Kuro\n";
  } else if (res2 > res1 && res2 > res3) {
    cout << "Shiro\n";
  } else if (res3 > res1 && res3 > res2) {
    cout << "Katie\n";
  } else {
    cout << "Draw\n";
  }
}
