#include <bits/stdc++.h>
using namespace std;
int N;
int cnt[5][200];
char inp[5][100005];
int _max[5];
char win[5][20] = {"", "Kuro", "Shiro", "Katie"};
int main() {
  scanf("%d", &N);
  for (int i = 1; i <= 3; i++) {
    scanf("%s", inp + i);
    for (int j = 0; inp[i][j]; j++) {
      cnt[i][inp[i][j]]++;
    }
  }
  if (N == 1) {
    for (int i = 1; i <= 3; i++) {
      int _min = 2e9;
      _max[i] = *max_element(cnt[i], cnt[i] + 200);
      if (_max[i] == strlen(inp[i])) {
        _max[i]--;
      } else
        _max[i]++;
    }
  } else {
    for (int i = 1; i <= 3; i++) {
      for (char c = 'a'; c <= 'z'; c++) {
        char tmp[100005] = {0};
        int tmpcnt[200] = {0};
        for (int j = 0; inp[i][j]; j++) {
          tmp[j] = inp[i][j];
        }
        int able = N;
        for (int j = 0; tmp[j] && able; j++) {
          if (tmp[j] != c) {
            tmp[j] = c;
            able--;
          }
        }
        for (int j = 0; tmp[j]; j++) {
          tmpcnt[tmp[j]]++;
        }
        sort(tmpcnt, tmpcnt + 200, greater<int>());
        _max[i] = max(_max[i], tmpcnt[0]);
      }
      for (char c = 'A'; c <= 'Z'; c++) {
        char tmp[100005] = {0};
        int tmpcnt[200] = {0};
        for (int j = 0; inp[i][j]; j++) {
          tmp[j] = inp[i][j];
        }
        int able = N;
        int cnt = 0;
        for (int j = 0; tmp[j] && able; j++) {
          if (tmp[j] != c) {
            tmp[j] = c;
            able--;
            cnt++;
          }
        }
        for (int j = 0; tmp[j]; j++) {
          tmpcnt[tmp[j]]++;
        }
        sort(tmpcnt, tmpcnt + 200, greater<int>());
        _max[i] = max(_max[i], tmpcnt[0]);
      }
    }
  }
  int ansi = max_element(_max, _max + 4) - _max;
  int cntt = 0;
  for (int i = 1; i <= 3; i++) {
    if (_max[i] == _max[ansi]) {
      cntt++;
    }
  }
  if (cntt > 1)
    printf("Draw");
  else {
    printf("%s", win[ansi]);
  }
}
