#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  int cnt_a[256] = {0}, ma = 0, beauty_a;
  int cnt_b[256] = {0}, mb = 0, beauty_b;
  int cnt_c[256] = {0}, mc = 0, beauty_c;
  string a, b, c;
  cin >> n >> a >> b >> c;
  for (const char i : a) ma = max(ma, ++cnt_a[i]);
  for (const char i : b) mb = max(mb, ++cnt_b[i]);
  for (const char i : c) mc = max(mc, ++cnt_c[i]);
  beauty_a = min((int)a.length(), ma + n);
  beauty_b = min((int)b.length(), mb + n);
  beauty_c = min((int)c.length(), mc + n);
  if (n == 1) {
    if (a.length() == ma) beauty_a--;
    if (b.length() == mb) beauty_b--;
    if (c.length() == mc) beauty_c--;
  }
  if (beauty_a > beauty_b && beauty_a > beauty_c)
    puts("Kuro");
  else if (beauty_b > beauty_a && beauty_b > beauty_c)
    puts("Shiro");
  else if (beauty_c > beauty_a && beauty_c > beauty_b)
    puts("Katie");
  else
    puts("Draw");
  return 0;
}
