#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  string a, b, c;
  vector<vector<long long> > arr(3, vector<long long>((26 * 2) + 1, 0));
  cin >> n;
  cin >> a >> b >> c;
  long long len = a.length();
  for (long long i = 0; i < len; i++) {
    char cur = a[i];
    if (cur >= 'a') {
      arr[0][cur - 97]++;
    } else {
      arr[0][cur - 65 + 26]++;
    }
  }
  for (long long i = 0; i < len; i++) {
    char cur = b[i];
    if (cur >= 'a') {
      arr[1][cur - 97]++;
    } else {
      arr[1][cur - 65 + 26]++;
    }
  }
  for (long long i = 0; i < len; i++) {
    char cur = c[i];
    if (cur >= 'a') {
      arr[2][cur - 97]++;
    } else {
      arr[2][cur - 65 + 26]++;
    }
  }
  for (long long i = 0; i < 52; i++) {
    if (arr[0][i] > arr[0][52]) {
      arr[0][52] = arr[0][i];
    }
    if (arr[1][i] > arr[1][52]) {
      arr[1][52] = arr[1][i];
    }
    if (arr[2][i] > arr[2][52]) {
      arr[2][52] = arr[2][i];
    }
  }
  long long x = arr[0][52], y = arr[1][52], z = arr[2][52];
  if (n == 1 && x == len) {
    x = len - 1;
  } else if (x + n >= len) {
    x = len;
  } else {
    x += n;
  }
  if (n == 1 && y == len) {
    y = len - 1;
  } else if (y + n >= len) {
    y = len;
  } else {
    y += n;
  }
  if (n == 1 && z == len) {
    z = len - 1;
  } else if (z + n >= len) {
    z = len;
  } else {
    z += n;
  }
  if (x > y && x > z) {
    cout << "Kuro\n";
  } else if (y > x && y > z) {
    cout << "Shiro\n";
  } else if (z > x && z > y) {
    cout << "Katie\n";
  } else {
    cout << "Draw\n";
  }
  return 0;
}
