#include<bits/stdc++.h>
using namespace std;
#define mp make_pair
typedef long long ll;
typedef long double ld;
const int maxn = 205000;
char s[3][maxn];
int cnt[3][60];
int max_[3] , ans[3];
int id(char c){return (c>='A'&&c<='Z') ? c-'A':c-'a'+26;}
int n , m;
void do_(int id){
for(int i = 0; i<52;i++){
int all = cnt[id][i];
if(m - all >= n){
ans[id]= max( all + n , ans[id]);
} else {
if(all != m || n > 1)
ans[id] = max(ans[id] , m);
else ans[id] = max(ans[id] , m - 1);
}
}
}
int main()
{
cin>>n;
gets(s[0]);
for(int i=1;i<=3;i++){
gets(s[i-1]);
}
m = strlen(s[0]);
for(int i=0;i<3;i++){
char * ss = s[i];
for(int j=0;j<m;j++){
++cnt[i][id(ss[j])];
}
do_(i);
}
int dd = ans[0] , pos_ = 0;
for(int i=1;i<3;i++)
if(ans[i] > dd){
dd = ans[i];
pos_ = i;
}
for(int i=0,j=0;i<3;i++){
if(ans[i] == dd) j++;
if(j>1) {
printf("Draw\n");
return 0;
}
}
if(pos_ == 0) cout<<"Kuro";
else if(pos_ == 1) cout<<"Shiro";
else cout<<"Katie"<<endl;
return 0;
}
using namespace std;
#define mp make_pair
typedef long long ll;
typedef long double ld;
const int maxn = 205000;
char s[3][maxn];
int cnt[3][60];
int max_[3] , ans[3];
int id(char c){return (c>='A'&&c<='Z') ? c-'A':c-'a'+26;}
int n , m;
void do_(int id){
for(int i = 0; i<52;i++){
int all = cnt[id][i];
if(m - all >= n){
ans[id]= max( all + n , ans[id]);
} else {
if(all != m || n > 1)
ans[id] = max(ans[id] , m);
else ans[id] = max(ans[id] , m - 1);
}
}
}
int main()
{
cin>>n;
gets(s[0]);
for(int i=1;i<=3;i++){
gets(s[i-1]);
}
m = strlen(s[0]);
for(int i=0;i<3;i++){
char * ss = s[i];
for(int j=0;j<m;j++){
++cnt[i][id(ss[j])];
}
do_(i);
}
int dd = ans[0] , pos_ = 0;
for(int i=1;i<3;i++)
if(ans[i] > dd){
dd = ans[i];
pos_ = i;
}
for(int i=0,j=0;i<3;i++){
if(ans[i] == dd) j++;
if(j>1) {
printf("Draw\n");
return 0;
}
}
if(pos_ == 0) cout<<"Kuro";
else if(pos_ == 1) cout<<"Shiro";
else cout<<"Katie"<<endl;
return 0;
}