#include <bits/stdc++.h>
using namespace std;
const int MAX = 1e5 + 55;
const int inf = 1e9 + 77;
const int MOD = 1e9 + 7;
const double PI = 3.14159265359;
const double eps = 1e-7;
int cnt1[300];
int cnt2[300];
int cnt3[300];
pair<int, int> mx[5];
void build() {
  for (int i = 1; i <= 3; ++i) {
    mx[i] = make_pair(0, i);
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int turns;
  cin >> turns;
  string s1, s2, s3;
  cin >> s1 >> s2 >> s3;
  int n = s1.size();
  if (turns >= n) {
    cout << "Draw";
    return 0;
  }
  build();
  for (int i = 0; i < n; ++i) {
    char ch;
    ch = s1[i];
    ++cnt1[(int)ch];
    ch = s2[i];
    ++cnt2[(int)ch];
    ch = s3[i];
    ++cnt3[(int)ch];
  }
  for (int i = (int)'A'; i <= (int)'z'; ++i) {
    mx[1].first = min(max(mx[1].first, cnt1[i]), n);
    mx[2].first = min(max(mx[2].first, cnt2[i]), n);
    mx[3].first = min(max(mx[3].first, cnt3[i]), n);
  }
  if (turns == 1) {
    if (mx[1].first == n) {
      mx[1].first--;
    } else
      mx[1].first++;
    if (mx[2].first == n) {
      mx[2].first--;
    } else
      mx[2].first++;
    if (mx[3].first == n) {
      mx[3].first--;
    } else
      mx[3].first++;
  } else {
    mx[1].first = min(mx[1].first + turns, n);
    mx[2].first = min(mx[2].first + turns, n);
    mx[3].first = min(mx[3].first + turns, n);
  }
  sort(mx + 1, mx + 4);
  if (mx[3].first == mx[2].first) {
    cout << "Draw";
  } else {
    int x = mx[3].second;
    if (x == 1)
      cout << "Kuro";
    else if (x == 2)
      cout << "Shiro";
    else if (x == 3)
      cout << "Katie";
  }
  return 0;
}
