#include <bits/stdc++.h>
using namespace std;
int a[300];
int b[300];
int c[300];
int main() {
  int n;
  string s1, s2, s3;
  cin >> n;
  cin >> s1 >> s2 >> s3;
  memset(a, 0, sizeof a);
  memset(b, 0, sizeof b);
  memset(c, 0, sizeof c);
  for (int i = 0; i < s1.size(); i++) {
    a[int(s1[i])]++;
  }
  for (int i = 0; i < s2.size(); i++) {
    b[int(s2[i])]++;
  }
  for (int i = 0; i < s3.size(); i++) {
    c[int(s3[i])]++;
  }
  int f1, f2, f3;
  int max1 = 0, max2 = 0, max3 = 0;
  for (int i = int('a'); i <= int('z'); i++) {
    if (n == 1 && s1.size() == a[i]) {
      if (s1.size() - 1 > max1) max1 = s1.size() - 1;
    } else if (n >= (s1.size() - a[i])) {
      if ((s1.size()) > max1) max1 = (s1.size());
    } else {
      if (a[i] + n > max1) max1 = a[i] + n;
    }
  }
  for (int i = int('A'); i <= int('Z'); i++) {
    if (n == 1 && s1.size() == a[i]) {
      if (s1.size() - 1 > max1) max1 = s1.size() - 1;
    } else if (n >= (s1.size() - a[i])) {
      if ((s1.size()) > max1) max1 = (s1.size());
    } else {
      if (a[i] + n > max1) max1 = a[i] + n;
    }
  }
  for (int i = int('a'); i <= int('z'); i++) {
    if (n == 1 && s2.size() == b[i]) {
      if (s2.size() - 1 > max2) max2 = s2.size() - 1;
    } else if (n >= (s2.size() - b[i])) {
      if ((s2.size()) > max2) max2 = (s2.size());
    } else {
      if (b[i] + n > max2) max2 = b[i] + n;
    }
  }
  for (int i = int('A'); i <= int('Z'); i++) {
    if (n == 1 && s2.size() == b[i]) {
      if (s2.size() - 1 > max2) max2 = s2.size() - 1;
    } else if (n >= (s2.size() - b[i])) {
      if ((s2.size()) > max2) max2 = (s2.size());
    } else {
      if (b[i] + n > max2) max2 = b[i] + n;
    }
  }
  for (int i = int('a'); i <= int('z'); i++) {
    if (n == 1 && s3.size() == c[i]) {
      if (s3.size() - 1 > max3) max3 = s3.size() - 1;
    } else if (n >= (s3.size() - c[i])) {
      if ((s3.size()) > max3) max3 = (s3.size());
    } else {
      if (c[i] + n > max3) max3 = c[i] + n;
    }
  }
  for (int i = int('A'); i <= int('Z'); i++) {
    if (n == 1 && s3.size() == c[i]) {
      if (s3.size() - 1 > max3) max3 = s3.size() - 1;
    } else if (n >= (s3.size() - c[i])) {
      if ((s3.size()) > max3) max3 = (s3.size());
    } else {
      if (c[i] + n > max3) max3 = c[i] + n;
    }
  }
  if (max1 == max(max1, max(max2, max3)) && max1 == max2)
    cout << "Draw";
  else if (max2 == max(max1, max(max2, max3)) && max3 == max2)
    cout << "Draw";
  else if (max1 == max(max1, max(max2, max3)) && max1 == max3)
    cout << "Draw";
  else if (max1 == max(max1, max(max2, max3)))
    cout << "Kuro";
  else if (max2 == max(max1, max(max2, max3)))
    cout << "Shiro";
  else if (max3 == max(max1, max(max2, max3)))
    cout << "Katie";
}
