#include <bits/stdc++.h>
using namespace std;
void run() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr), cout.tie(nullptr);
}
int freq1[130], freq2[130], freq3[130];
int main() {
  run();
  int n;
  cin >> n;
  string s1, s2, s3;
  cin >> s1 >> s2 >> s3;
  for (int i = 0; i < ((int)((s1).size())); ++i)
    freq1[s1[i]]++, freq2[s2[i]]++, freq3[s3[i]]++;
  int max_freq1 = 0, max_freq2 = 0, max_freq3 = 0;
  for (int i = 'a'; i <= 'z'; i++) {
    max_freq1 = max(max_freq1, max(freq1[i], freq1[i - 32]));
    max_freq2 = max(max_freq2, max(freq2[i], freq2[i - 32]));
    max_freq3 = max(max_freq3, max(freq3[i], freq3[i - 32]));
  }
  int rem1 = ((int)((s1).size())) - max_freq1;
  int rem2 = ((int)((s2).size())) - max_freq2;
  int rem3 = ((int)((s3).size())) - max_freq3;
  int can1 = min(rem1, n) + max_freq1;
  int can2 = min(rem2, n) + max_freq2;
  int can3 = min(rem3, n) + max_freq3;
  if (rem1 == 0 && n == 1) can1--;
  if (rem2 == 0 && n == 1) can2--;
  if (rem3 == 0 && n == 1) can3--;
  int max_ans = max(can1, max(can2, can3)), cnt = 0;
  cnt = (max_ans == can1) + (max_ans == can2) + (max_ans == can3);
  if (cnt > 1)
    cout << "Draw";
  else if (max_ans == can1)
    puts("Kuro");
  else if (max_ans == can2)
    puts("Shiro");
  else
    puts("Katie");
  return 0;
}
