#include <bits/stdc++.h>
using namespace std;
int freq[205];
int main() {
  int n;
  cin >> n;
  int a[3], maximum = -1;
  for (int i = 0; i < 3; ++i) {
    string s;
    cin >> s;
    int maxi = -1, x = n;
    memset(freq, 0, sizeof freq);
    for (char c : s) ++freq[c], maxi = max(maxi, freq[c]);
    if (x == 1) {
      if (maxi == (int)s.size())
        --maxi;
      else
        ++maxi;
      a[i] = maxi;
      maximum = max(maximum, a[i]);
      continue;
    }
    if (maxi + x >= (int)s.size()) {
      x -= (s.size() - maxi);
      maxi = s.size();
    } else {
      maxi += n;
      x = 0;
    }
    a[i] = maxi;
    maximum = max(maximum, maxi);
  }
  if (a[0] == a[1] && a[0] == maximum || a[1] == a[2] && a[1] == maximum ||
      a[0] == a[2] && a[2] == maximum)
    cout << "Draw";
  else if (a[0] > a[1] && a[0] > a[2])
    cout << "Kuro";
  else if (a[1] > a[0] && a[1] > a[2])
    cout << "Shiro";
  else if (a[2] > a[1] && a[2] > a[0])
    cout << "Katie";
}
