#include <bits/stdc++.h>
using namespace std;
int n;
char s[4][100010];
int sum[300];
int maxs[10];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= 3; i++) scanf("%s", s[i]);
  int len = strlen(s[1]);
  for (int i = 1; i <= 3; i++) {
    memset(sum, 0, sizeof sum);
    for (int j = 0; j < len; j++) {
      sum[s[i][j]]++;
      maxs[i] = max(maxs[i], sum[s[i][j]]);
    }
  }
  for (int i = 1; i <= 3; i++) {
    if (maxs[i] == len && n == 1)
      maxs[i]--;
    else
      maxs[i] = min(len, maxs[i] + n);
  }
  if (maxs[1] > maxs[2] && maxs[1] > maxs[3]) {
    printf("Kuro");
  } else if (maxs[2] > maxs[1] && maxs[2] > maxs[3]) {
    printf("Shiro");
  } else if (maxs[3] > maxs[2] && maxs[3] > maxs[1]) {
    printf("Katie");
  } else
    printf("Draw");
}
