#include <cstdio>
#include <algorithm>
#include <cstring>
#include <cmath>
#include <iostream>
#define ll long long
#define _for(i, a, b) for(int (i) = (a); (i) <= (b); ++(i))
#define _rep(i, a, b) for(int (i) = (a); (i) >= (b); --(i))
#define _spfor(i, a, b, c) for(int (i) = (a); (i) <= (b); (i) += (c))
#define _sprep(i, a, b, c) for(int (i) = (a); (i) >= (b); (i) -= (c))
#define _forll(i, a, b) for(ll (i) = (a); (i) <= (b); ++(i))
#define _repll(i, a, b) for(ll (i) = (a); (i) >= (b); --(i))
#define _spforll(i, a, b, c) for(ll (i) = (a); (i) <= (b); (i) += (c))
#define _sprepll(i, a, b, c) for(ll (i) = (a); (i) >= (b); (i) -= (c))
using namespace std;

inline void getint(int& x) {
	int f = 1; x = 0;
	char c = getchar();
	while(!isdigit(c)) {if(c == '-') f = -1; c = getchar();}
	while(isdigit(c)) {x = x * 10 + c - '0'; c = getchar();}
	x *= f;
}
inline void getll(ll &x) {
	ll f = 1; x = 0;
	char c = getchar();
	while(!isdigit(c)) {if(c == '-') f = -1; c = getchar();}
	while(isdigit(c)) {x = x * 10 + c - '0'; c = getchar();}
	x *= f;
}
inline void writeint(int& x) {
	if(!x) {printf("0"); return;}
	else if(x < 0) printf("-");
	int tmp = x < 0 ? -x : x, digit[17] = {0};
	while(tmp) {digit[++digit[0]] = tmp % 10; tmp /= 10;}
	_rep(i, digit[0], 1)	printf("%d", digit[i]);
}
inline void writell(ll& x) {
	if(!x) {printf("0"); return;}
	else if(x < 0) printf("-");
	ll tmp = x < 0 ? -x : x; int digit[27] = {0};
	while(tmp) {digit[++digit[0]] = tmp % 10; tmp /= 10;}
	_rep(i, digit[0], 1)	printf("%d", digit[i]);
}

string s, ans[207];

int main() {
	cin >> s;
	int len = s.size(), lastat = len - 1, vis[207] = {0}, cnt = 0;
	_rep(i, len - 1, 0) {
		if(s[i] == '@' && !vis[i + 1] && i != 0 && i != len - 1) {
			cnt++;
			_for(j, i - 1, lastat) {
				ans[cnt] += s[j];
				vis[j] = 1;
			}
			lastat = i - 2;
		}
		else if(s[i] == '@' && (vis[i + 1] || i == 0 || i == len - 1))
			return printf("No solution"), 0;
		else	continue;
	}
	if(!cnt)	return printf("No solution"), 0;
	string rest = "";
	_for(i, 0, lastat)	rest += s[i];
	ans[cnt] = rest + ans[cnt];
	_rep(i, cnt, 1) {
		cout << ans[i];
		if(i != 1)	printf(",");
	}
	return 0;
}


#include <cstdio>
#include <algorithm>
#include <cstring>
#include <cmath>
#include <iostream>
#define ll long long
#define _for(i, a, b) for(int (i) = (a); (i) <= (b); ++(i))
#define _rep(i, a, b) for(int (i) = (a); (i) >= (b); --(i))
#define _spfor(i, a, b, c) for(int (i) = (a); (i) <= (b); (i) += (c))
#define _sprep(i, a, b, c) for(int (i) = (a); (i) >= (b); (i) -= (c))
#define _forll(i, a, b) for(ll (i) = (a); (i) <= (b); ++(i))
#define _repll(i, a, b) for(ll (i) = (a); (i) >= (b); --(i))
#define _spforll(i, a, b, c) for(ll (i) = (a); (i) <= (b); (i) += (c))
#define _sprepll(i, a, b, c) for(ll (i) = (a); (i) >= (b); (i) -= (c))
using namespace std;

inline void getint(int& x) {
	int f = 1; x = 0;
	char c = getchar();
	while(!isdigit(c)) {if(c == '-') f = -1; c = getchar();}
	while(isdigit(c)) {x = x * 10 + c - '0'; c = getchar();}
	x *= f;
}
inline void getll(ll &x) {
	ll f = 1; x = 0;
	char c = getchar();
	while(!isdigit(c)) {if(c == '-') f = -1; c = getchar();}
	while(isdigit(c)) {x = x * 10 + c - '0'; c = getchar();}
	x *= f;
}
inline void writeint(int& x) {
	if(!x) {printf("0"); return;}
	else if(x < 0) printf("-");
	int tmp = x < 0 ? -x : x, digit[17] = {0};
	while(tmp) {digit[++digit[0]] = tmp % 10; tmp /= 10;}
	_rep(i, digit[0], 1)	printf("%d", digit[i]);
}
inline void writell(ll& x) {
	if(!x) {printf("0"); return;}
	else if(x < 0) printf("-");
	ll tmp = x < 0 ? -x : x; int digit[27] = {0};
	while(tmp) {digit[++digit[0]] = tmp % 10; tmp /= 10;}
	_rep(i, digit[0], 1)	printf("%d", digit[i]);
}

string s, ans[207];

int main() {
	cin >> s;
	int len = s.size(), lastat = len - 1, vis[207] = {0}, cnt = 0;
	_rep(i, len - 1, 0) {
		if(s[i] == '@' && !vis[i + 1] && i != 0 && i != len - 1) {
			cnt++;
			_rep(j, lastat, i - 1) {
				ans[cnt] += s[j];
				vis[j] = 1;
			}
			lastat = i - 2;
		}
		else if(s[i] == '@' && (vis[i + 1] || i == 0 || i == len - 1))
			return printf("No solution"), 0;
		else	continue;
	}
	_for(i, 1, cnt) {
		cout << ans[i];
		if(i != cnt)	printf(",");
	}
	return 0;
}


#include <cstdio>
#include <algorithm>
#include <cstring>
#include <cmath>
#include <iostream>
#define ll long long
#define _for(i, a, b) for(int (i) = (a); (i) <= (b); ++(i))
#define _rep(i, a, b) for(int (i) = (a); (i) >= (b); --(i))
#define _spfor(i, a, b, c) for(int (i) = (a); (i) <= (b); (i) += (c))
#define _sprep(i, a, b, c) for(int (i) = (a); (i) >= (b); (i) -= (c))
#define _forll(i, a, b) for(ll (i) = (a); (i) <= (b); ++(i))
#define _repll(i, a, b) for(ll (i) = (a); (i) >= (b); --(i))
#define _spforll(i, a, b, c) for(ll (i) = (a); (i) <= (b); (i) += (c))
#define _sprepll(i, a, b, c) for(ll (i) = (a); (i) >= (b); (i) -= (c))
using namespace std;

inline void getint(int& x) {
	int f = 1; x = 0;
	char c = getchar();
	while(!isdigit(c)) {if(c == '-') f = -1; c = getchar();}
	while(isdigit(c)) {x = x * 10 + c - '0'; c = getchar();}
	x *= f;
}
inline void getll(ll &x) {
	ll f = 1; x = 0;
	char c = getchar();
	while(!isdigit(c)) {if(c == '-') f = -1; c = getchar();}
	while(isdigit(c)) {x = x * 10 + c - '0'; c = getchar();}
	x *= f;
}
inline void writeint(int& x) {
	if(!x) {printf("0"); return;}
	else if(x < 0) printf("-");
	int tmp = x < 0 ? -x : x, digit[17] = {0};
	while(tmp) {digit[++digit[0]] = tmp % 10; tmp /= 10;}
	_rep(i, digit[0], 1)	printf("%d", digit[i]);
}
inline void writell(ll& x) {
	if(!x) {printf("0"); return;}
	else if(x < 0) printf("-");
	ll tmp = x < 0 ? -x : x; int digit[27] = {0};
	while(tmp) {digit[++digit[0]] = tmp % 10; tmp /= 10;}
	_rep(i, digit[0], 1)	printf("%d", digit[i]);
}

string s, ans[207];

int main() {
	cin >> s;
	int len = s.size(), lastat = len - 1, vis[207] = {0}, cnt = 0;
	_rep(i, len - 1, 0) {
		if(s[i] == '@' && !vis[i + 1] && i != 0 && i != len - 1) {
			cnt++;
			_for(j, i - 1, lastat) {
				ans[cnt] += s[j];
				vis[j] = 1;
			}
			lastat = i - 2;
		}
		else if(s[i] == '@' && (vis[i + 1] || i == 0 || i == len - 1))
			return printf("No solution"), 0;
		else	continue;
	}
	string rest = "";
	_for(i, 0, lastat)	rest += s[i];
	ans[cnt] = rest + ans[cnt];
	_rep(i, cnt, 1) {
		cout << ans[i];
		if(i != 1)	printf(",");
	}
	return 0;
}


#include <cstdio>
#include <algorithm>
#include <cstring>
#include <cmath>
#include <iostream>
#define ll long long
#define _for(i, a, b) for(int (i) = (a); (i) <= (b); ++(i))
#define _rep(i, a, b) for(int (i) = (a); (i) >= (b); --(i))
#define _spfor(i, a, b, c) for(int (i) = (a); (i) <= (b); (i) += (c))
#define _sprep(i, a, b, c) for(int (i) = (a); (i) >= (b); (i) -= (c))
#define _forll(i, a, b) for(ll (i) = (a); (i) <= (b); ++(i))
#define _repll(i, a, b) for(ll (i) = (a); (i) >= (b); --(i))
#define _spforll(i, a, b, c) for(ll (i) = (a); (i) <= (b); (i) += (c))
#define _sprepll(i, a, b, c) for(ll (i) = (a); (i) >= (b); (i) -= (c))
using namespace std;

inline void getint(int& x) {
	int f = 1; x = 0;
	char c = getchar();
	while(!isdigit(c)) {if(c == '-') f = -1; c = getchar();}
	while(isdigit(c)) {x = x * 10 + c - '0'; c = getchar();}
	x *= f;
}
inline void getll(ll &x) {
	ll f = 1; x = 0;
	char c = getchar();
	while(!isdigit(c)) {if(c == '-') f = -1; c = getchar();}
	while(isdigit(c)) {x = x * 10 + c - '0'; c = getchar();}
	x *= f;
}
inline void writeint(int& x) {
	if(!x) {printf("0"); return;}
	else if(x < 0) printf("-");
	int tmp = x < 0 ? -x : x, digit[17] = {0};
	while(tmp) {digit[++digit[0]] = tmp % 10; tmp /= 10;}
	_rep(i, digit[0], 1)	printf("%d", digit[i]);
}
inline void writell(ll& x) {
	if(!x) {printf("0"); return;}
	else if(x < 0) printf("-");
	ll tmp = x < 0 ? -x : x; int digit[27] = {0};
	while(tmp) {digit[++digit[0]] = tmp % 10; tmp /= 10;}
	_rep(i, digit[0], 1)	printf("%d", digit[i]);
}

string s, ans[207];

int main() {
	cin >> s;
	int len = s.size(), lastat = len - 1, vis[207] = {0}, cnt = 0;
	_rep(i, len - 1, 0) {
		if(s[i] == '@' && !vis[i + 1] && i != 0 && i != len - 1) {
			cnt++;
			_for(j, i - 1, lastat) {
				ans[cnt] += s[j];
				vis[j] = 1;
			}
			lastat = i - 2;
		}
		else if(s[i] == '@' && (vis[i + 1] || i == 0 || i == len - 1))
			return printf("No solution"), 0;
		else	continue;
	}
	string rest = "";
	_for(i, 0, lastat)	rest += s[i];
	ans[cnt] = rest + ans[cnt];
	_for(i, 1, cnt) {
		cout << ans[i];
		if(i != cnt)	printf(",");
	}
	return 0;
}


#include <bits\stdc++.h>
using namespace std;
#define rep(flag,a,b) for(int flag=(a);flag<=b;flag++)
#define Rep(flag,a,b) for(int flag=(a);flag>=b;flag--)
#define mem(flag) memset(flag,0,sizeof(flag))
#define Mem(flag) memset(flag,-1,sizeof(flag))
typedef long long ll;
typedef unsigned long long ull;
typedef vector<pair<int,int> > vp;
const int MAX=205;

#define DEBUG

char s[MAX];

int main() {
	#ifdef DEBUG
	//freopen("input.txt","r",stdin);
	//freopen("output.txt","w",stdout);
	int cases=1;
	while(cases--) {
	#endif
		scanf("%s",s);
		int count=0,len=strlen(s);
		rep(i,0,len-1) if(s[i]=='@') count++;
		int k=1; bool ok=true;
		rep(i,0,len-1) {
			if(s[i]=='@') {
				bool left,right; int j;
				for(j=i-1;j>=0&&s[j]!='@';j--) ;
				if(j>=0) left=true;
				else left=false;
				if(left&&i-j-1<2) {
					ok=false; break;
				} else if(!left&&i-j-1<1) {
					ok=false; break;
				}
				for(j=i+1;j<=len-1&&s[j]!='@';j++) ;
				if(j<=len-1) right=true;
				else right=false;
				if(right&&j-i-1<2) {
					ok=false; break;
				} else if(!right&&j-i-1<1) {
					ok=false; break;
				}
			}
		}
		if(!ok) printf("No solution\n");
		else {
			rep(i,0,len-1) {
				if(s[i]=='@') {
					bool left,right; int j;
					for(j=i-1;j>=0&&s[j]!='@';j--) ;
					if(j>=0) left=true;
					else left=false;
					if(!left) {
						for(j=0;j<i;j++) printf("%c",s[j]);
					} else {
						for(j=j+2;j<i;j++) printf("%c",s[j]);
					}
					printf("@");
					for(j=i+1;j<=len-1&&s[j]!='@';j++) ;
					if(j<=len-1) right=true;
					else right=false;
					if(!right) for(j=i+1;j<len;j++) printf("%c",s[j]);
					else {
						printf("%c",s[i+1]);
					}
					if(k!=count) printf(",");
					k++;
				}
			}
		}
	#ifdef DEBUG
	}
	#endif
	return 0;
}


#include <bits\stdc++.h>
using namespace std;
#define rep(flag,a,b) for(int flag=(a);flag<=b;flag++)
#define Rep(flag,a,b) for(int flag=(a);flag>=b;flag--)
#define mem(flag) memset(flag,0,sizeof(flag))
#define Mem(flag) memset(flag,-1,sizeof(flag))
typedef long long ll;
typedef unsigned long long ull;
typedef vector<pair<int,int> > vp;
const int MAX=205;

#define DEBUG

char s[MAX];

int main() {
	#ifdef DEBUG
    //freopen("input.txt","r",stdin);
    //freopen("output.txt","w",stdout);
	int cases=1;
	while(cases--) {
	#endif
		scanf("%s",s);
		int count=0,len=strlen(s);
		rep(i,0,len-1) if(s[i]=='@') count++;
        if(count==0) printf("No solution\n");
        else {
            int k=1; bool ok=true;
            rep(i,0,len-1) {
                if(s[i]=='@') {
                    bool left,right; int j;
                    for(j=i-1;j>=0&&s[j]!='@';j--) ;
                    if(j>=0) left=true;
                    else left=false;
                    if(left&&i-j-1<2) {
                        ok=false; break;
                    } else if(!left&&i-j-1<1) {
                        ok=false; break;
                    }
                    for(j=i+1;j<=len-1&&s[j]!='@';j++) ;
                    if(j<=len-1) right=true;
                    else right=false;
                    if(right&&j-i-1<2) {
                        ok=false; break;
                    } else if(!right&&j-i-1<1) {
                        ok=false; break;
                    }
                }
            }
            if(!ok) printf("No solution\n");
            else {
                rep(i,0,len-1) {
                    if(s[i]=='@') {
                        bool left,right; int j;
                        for(j=i-1;j>=0&&s[j]!='@';j--) ;
                        if(j>=0) left=true;
                        else left=false;
                        if(!left) {
                            for(j=0;j<i;j++) printf("%c",s[j]);
                        } else {
                            for(j=j+2;j<i;j++) printf("%c",s[j]);
                        }
                        printf("@");
                        for(j=i+1;j<=len-1&&s[j]!='@';j++) ;
                        if(j<=len-1) right=true;
                        else right=false;
                        if(!right) for(j=i+1;j<len;j++) printf("%c",s[j]);
                        else {
                            printf("%c",s[i+1]);
                        }
                        if(k!=count) printf(",");
                        k++;
                    }
                }
            }
        }
	#ifdef DEBUG
	}
	#endif
	return 0;
}


#include <bits\stdc++.h>
using namespace std;
#define rep(flag,a,b) for(int flag=(a);flag<=b;flag++)
#define Rep(flag,a,b) for(int flag=(a);flag>=b;flag--)
#define mem(flag) memset(flag,0,sizeof(flag))
#define Mem(flag) memset(flag,-1,sizeof(flag))
typedef long long ll;
typedef unsigned long long ull;
typedef vector<pair<int,int> > vp;
const int MAX=205;

#define DEBUG

char s[MAX];

int main() {
	#ifdef DEBUG
    //freopen("input.txt","r",stdin);
    //freopen("output.txt","w",stdout);
	int cases=1;
	while(cases--) {
	#endif
		scanf("%s",s);
		int count=0,len=strlen(s);
		rep(i,0,len-1) if(s[i]=='@') count++;
        if(count==0) printf("NO solution\n");
        else {
            int k=1; bool ok=true;
            rep(i,0,len-1) {
                if(s[i]=='@') {
                    bool left,right; int j;
                    for(j=i-1;j>=0&&s[j]!='@';j--) ;
                    if(j>=0) left=true;
                    else left=false;
                    if(left&&i-j-1<2) {
                        ok=false; break;
                    } else if(!left&&i-j-1<1) {
                        ok=false; break;
                    }
                    for(j=i+1;j<=len-1&&s[j]!='@';j++) ;
                    if(j<=len-1) right=true;
                    else right=false;
                    if(right&&j-i-1<2) {
                        ok=false; break;
                    } else if(!right&&j-i-1<1) {
                        ok=false; break;
                    }
                }
            }
            if(!ok) printf("No solution\n");
            else {
                rep(i,0,len-1) {
                    if(s[i]=='@') {
                        bool left,right; int j;
                        for(j=i-1;j>=0&&s[j]!='@';j--) ;
                        if(j>=0) left=true;
                        else left=false;
                        if(!left) {
                            for(j=0;j<i;j++) printf("%c",s[j]);
                        } else {
                            for(j=j+2;j<i;j++) printf("%c",s[j]);
                        }
                        printf("@");
                        for(j=i+1;j<=len-1&&s[j]!='@';j++) ;
                        if(j<=len-1) right=true;
                        else right=false;
                        if(!right) for(j=i+1;j<len;j++) printf("%c",s[j]);
                        else {
                            printf("%c",s[i+1]);
                        }
                        if(k!=count) printf(",");
                        k++;
                    }
                }
            }
        }
	#ifdef DEBUG
	}
	#endif
	return 0;
}


import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        String s1 = in.next();
        String s2 = in.next();
        String s3 = in.next();

        int a[][] = new int[3][58];
        for (int i=0;i<s1.length();i++){
            a[0][s1.charAt(i)-65]++;
        }
        for (int i=0;i<s2.length();i++){
            a[1][s2.charAt(i)-65]++;
        }
        for (int i=0;i<s3.length();i++){
            a[2][s3.charAt(i)-65]++;
        }
        int max1 = 0,max2=0,max3=0;
        for (int i=0;i<58;i++){
            if (a[0][i]>max1){
                max1 = a[0][i];
            }
        }
        for (int i=0;i<58;i++){
            if (a[1][i]>max2){
                max2 = a[1][i];
            }
        }
        for (int i=0;i<58;i++){
            if (a[2][i]>max3){
                max3 = a[2][i];
            }
        }
        int l = s1.length();
        if(n==1){
            if (max1==l)
                max1--;
            else
                max1++;
            if (max2==l)
                max2--;
            else
                max2++;
            if (max3==l)
                max3--;
            else
                max3++;
            if (max1>max2&&max1>max3){
                System.out.println("Kuro");
            }else if (max2>max1&&max2>max3){
                System.out.println("Shiro");
            }else if (max3>max1&&max2>max1){
                System.out.println("Katie");
            }else {
                System.out.println("Draw");
            }
            return;
        }

        max1+=n;
        max2+=n;
        max3+=n;
        int flag = 0;
        if (max1>=l)
            flag++;
        if (max2>=l)
            flag++;
        if (max3>=l)
            flag++;
        if (flag>=2){
            System.out.println("Draw");
        }else {
            if (max1>max2&&max1>max3){
                System.out.println("Kuro");
            }else if (max2>max1&&max2>max3){
                System.out.println("Shiro");
            }else if (max3>max1&&max2>max1){
                System.out.println("Katie");
            }else {
                System.out.println("Draw");
            }
        }

    }
}


import java.io.*;
import java.lang.reflect.Array;
import java.util.*;

public class Main
{
    static PrintWriter pw = new PrintWriter(System.out);

    static class node
    {
        String s;
        int size;
        int rounds;
        int[] c1 = new int[26];
        int[] c2 = new int[26];
        int beauty;

        node(String str , int x)
        {
            s =str;
            size = s.length();
            rounds = x;
            find();
        }

        void find()
        {
            for(int i = 0 ; i<size ; i++)
            {
                char x = s.charAt(i);
                if(x >= 'a' && x <= 'z')c1[x - 'a']++;
                else c2[x - 'A']++;
            }

            for(int i = 0 ; i<26 ; i++)
            {
                beauty = Math.max(beauty , Math.max(c1[i] , c2[i]));
            }

        }

        int get()
        {
            int x = size - beauty;

            if(rounds == 1 && x == 0)return beauty -1;

            if(x <= rounds)return size;
            else return beauty + rounds;
        }

    }

    static class p implements Comparable<p>
    {
        String s;
        int b;

        p(int x , String str ){
            s = str; b = x;
        }

        @Override
        public int compareTo(p o) {
            return o.b - b;
        }
    }

    public static void main(String[] args)throws Exception
    {
        Reader.init(System.in);
        int r = Reader.nextInt();

        int n1 = new node(Reader.next() , r).get();
        int n2 = new node(Reader.next() , r).get();
        int n3 = new node(Reader.next() , r).get();

        ArrayList<p> ar = new ArrayList<>();

        ar.add(new p(n1 , "Kuro"));
        ar.add(new p(n2 , "Shiro"));
        ar.add(new p(n3 , "Katie"));

        Collections.sort(ar);

        if(ar.get(0).b > ar.get(1).b)pw.println(ar.get(0).s);
        else pw.println("Draw");
        pw.close();
    }

}

class Reader {

    static BufferedReader reader;
    static StringTokenizer tokenizer;

    public static int pars(String x) {
        int num = 0;
        int i = 0;
        if (x.charAt(0) == '-') {
            i = 1;
        }
        for (; i < x.length(); i++) {
            num = num * 10 + (x.charAt(i) - '0');
        }

        if (x.charAt(0) == '-') {
            return -num;
        }

        return num;
    }

    static void init(InputStream input) {
        reader = new BufferedReader(
                new InputStreamReader(input));
        tokenizer = new StringTokenizer("");
    }

    static void init(FileReader input) {
        reader = new BufferedReader(input);
        tokenizer = new StringTokenizer("");
    }

    static String next() throws IOException {
        while (!tokenizer.hasMoreTokens())
        {
            String line = reader.readLine();
            if(line == null || line.equals(""))throw  new IOException();
            tokenizer = new StringTokenizer(line);
        }
        return tokenizer.nextToken();
    }

    static int nextInt() throws IOException {
        return pars(next());
    }

    static long nextLong() throws IOException {
        return Long.parseLong(next());
    }

    static double nextDouble() throws IOException {
        return Double.parseDouble(next());
    }

}


import java.io.*;
import java.lang.reflect.Array;
import java.util.*;

public class Main
{
    static PrintWriter pw = new PrintWriter(System.out);

    static class node
    {
        String s;
        int size;
        int rounds;
        int[] c1 = new int[26];
        int[] c2 = new int[26];
        int beauty;

        node(String str , int x)
        {
            s =str;
            size = s.length();
            rounds = x;
            find();
        }

        void find()
        {
            for(int i = 0 ; i<size ; i++)
            {
                char x = s.charAt(i);
                if(x >= 'a' && x <= 'z')c1[x - 'a']++;
                else c2[x - 'A']++;
            }

            for(int i = 0 ; i<26 ; i++)
            {
                beauty = Math.max(beauty , Math.max(c1[i] , c2[i]));
            }

        }

        int get()
        {
            int x = size - beauty;

            if(x <= rounds)return size;
            else return beauty + rounds;
        }

    }

    static class p implements Comparable<p>
    {
        String s;
        int b;

        p(int x , String str ){
            s = str; b = x;
        }

        @Override
        public int compareTo(p o) {
            return o.b - b;
        }
    }

    public static void main(String[] args)throws Exception
    {
        Reader.init(System.in);
        int r = Reader.nextInt();

        int n1 = new node(Reader.next() , r).get();
        int n2 = new node(Reader.next() , r).get();
        int n3 = new node(Reader.next() , r).get();

        ArrayList<p> ar = new ArrayList<>();

        ar.add(new p(n1 , "Kuro"));
        ar.add(new p(n2 , "Shiro"));
        ar.add(new p(n3 , "Katie"));

        Collections.sort(ar);

        if(ar.get(0).b > ar.get(1).b)pw.println(ar.get(0).s);
        else pw.println("Draw");
        pw.close();
    }

}

class Reader {

    static BufferedReader reader;
    static StringTokenizer tokenizer;

    public static int pars(String x) {
        int num = 0;
        int i = 0;
        if (x.charAt(0) == '-') {
            i = 1;
        }
        for (; i < x.length(); i++) {
            num = num * 10 + (x.charAt(i) - '0');
        }

        if (x.charAt(0) == '-') {
            return -num;
        }

        return num;
    }

    static void init(InputStream input) {
        reader = new BufferedReader(
                new InputStreamReader(input));
        tokenizer = new StringTokenizer("");
    }

    static void init(FileReader input) {
        reader = new BufferedReader(input);
        tokenizer = new StringTokenizer("");
    }

    static String next() throws IOException {
        while (!tokenizer.hasMoreTokens())
        {
            String line = reader.readLine();
            if(line == null || line.equals(""))throw  new IOException();
            tokenizer = new StringTokenizer(line);
        }
        return tokenizer.nextToken();
    }

    static int nextInt() throws IOException {
        return pars(next());
    }

    static long nextLong() throws IOException {
        return Long.parseLong(next());
    }

    static double nextDouble() throws IOException {
        return Double.parseDouble(next());
    }

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.util.*;

public class Solution
{

   public static long freq(String s){
       HashMap<Character,Integer>h=new HashMap<>();
       long m=1;
       for(int i=0;i<s.length();i++){
           char ch=s.charAt(i);
           if(h.containsKey(ch)){
               h.put(ch,h.get(ch)+1);
               m=Math.max(m,h.get(ch));
           }else{
               h.put(ch,1);
           }
       }
       return m;

   }

    public static void main(String[] args) throws IOException
    {

       BufferedReader br = new BufferedReader(
                              new InputStreamReader(System.in));
        StringBuilder out=new StringBuilder();
        long n=Long.parseLong(br.readLine());
       String a=br.readLine();
       long aa=freq(a);
        String b=br.readLine();
       long bb=freq(b);
        String c=br.readLine();
       long cc=freq(c);
       if(a.length()-aa<=n){

           aa=a.length();

       }else{
           aa=aa+n;
       }
        if(b.length()-bb<=n){

           bb=b.length();

       }else{
           bb=bb+n;
       }
        if(c.length()-cc<=n){
           cc=c.length();
       }else{
           cc=cc+n;
       }
      long max=Math.max(aa,Math.max(bb,cc));
      if(max==aa && max!=bb && max!=cc)
      System.out.println("Kuro");
      else if(max==bb && max!=aa && max!=cc)
      System.out.println("Shiro");
        else if(max==cc && max!=aa && max!=bb)
      System.out.println("Katie");
      else
        System.out.println("Draw");
}}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.util.*;

public class Solution
{

   public static int freq(String s){
       HashMap<Character,Integer>h=new HashMap<>();
       int m=1;
       for(int i=0;i<s.length();i++){
           char ch=s.charAt(i);
           if(h.containsKey(ch)){
               h.put(ch,h.get(ch)+1);
               m=Math.max(m,h.get(ch));
           }else{
               h.put(ch,1);
           }
       }
       return m;

   }
            public static       int get(int size,int beauty,int rounds)
        {
            int x = size - beauty;

            if(rounds == 1 && x == 0)return beauty -1;

            if(x <= rounds)return size;
            else return beauty + rounds;
        }

    public static void main(String[] args) throws IOException
    {

       BufferedReader br = new BufferedReader(
                              new InputStreamReader(System.in));
        StringBuilder out=new StringBuilder();
        int n=Integer.parseInt(br.readLine());
       String a=br.readLine();
       int aa=freq(a);
        String b=br.readLine();
       int bb=freq(b);
        String c=br.readLine();
       int cc=freq(c);
     aa=get(a.length(),aa,n);
      bb=get(b.length(),bb,n);
       cc=get(c.length(),cc,n);
     int max=Math.max(aa,Math.max(bb,cc));
      if(max==aa && max!=bb && max!=cc)
      System.out.println("Kuro");
      else if(max==bb && max!=aa && max!=cc)
      System.out.println("Shiro");
        else if(max==cc && max!=aa && max!=bb)
      System.out.println("Katie");
      else
        System.out.println("Draw");
}}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Vadim
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastScanner in = new FastScanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        B solver = new B();
        solver.solve(1, in, out);
        out.close();
    }

    static class B {
        int ind(char c) {
            if (c >= 'A' && c <= 'Z') {
                return c - 'A';
            } else {
                return c - 'a' + 26;
            }
        }

        public void solve(int testNumber, FastScanner in, PrintWriter out) {
            int n = in.ni();
            int[] max = new int[3];
            String[] names = new String[]{"Kuro", "Shiro", "Katie"};
            int maxmax = -1;
            int maxind = -1;
            int maxcnt = 0;
            for (int i = 0; i < 3; i++) {
                String s = in.ns();
                int[] cnt = new int[52];
                for (int j = 0; j < s.length(); j++) {
                    int x = ind(s.charAt(j));
                    cnt[x]++;
                    max[i] = Math.max(max[i], cnt[x]);
                }
                if (max[i] == s.length()) {
                    if (n == 1)
                        max[i] = s.length() - 1;
                    else
                        max[i] = s.length();

                } else if (max[i] + n > s.length()) {
                    max[i] = s.length();
                } else
                    max[i] += n;
                if (max[i] > maxmax) {
                    maxmax = max[i];
                    maxind = i;
                    maxcnt = 1;
                } else if (max[i] == maxmax) {
                    maxcnt++;
                }
            }
            if (maxcnt > 1) {
                out.println("Draw");
            } else
                out.println(names[maxind]);

        }

    }

    static class FastScanner {
        private BufferedReader in;
        private StringTokenizer st;

        public FastScanner(InputStream stream) {
            in = new BufferedReader(new InputStreamReader(stream));
        }

        public String ns() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    String rl = in.readLine();
                    if (rl == null) {
                        return null;
                    }
                    st = new StringTokenizer(rl);
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return st.nextToken();
        }

        public int ni() {
            return Integer.parseInt(ns());
        }

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Vadim
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastScanner in = new FastScanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        B solver = new B();
        solver.solve(1, in, out);
        out.close();
    }

    static class B {
        int ind(char c) {
            if (c >= 'A' && c <= 'Z') {
                return c - 'A';
            } else {
                return c - 'a' + 26;
            }
        }

        public void solve(int testNumber, FastScanner in, PrintWriter out) {
            int n = in.ni();
            int[] max = new int[3];
            String[] names = new String[]{"Kuro", "Shiro", "Katie"};
            int maxmax = -1;
            int maxind = -1;
            int maxcnt = 0;
            for (int i = 0; i < 3; i++) {
                String s = in.ns();
                int[] cnt = new int[52];
                for (int j = 0; j < s.length(); j++) {
                    int x = ind(s.charAt(j));
                    cnt[x]++;
                    max[i] = Math.max(max[i], cnt[x]);
                }
                if (max[i] + n > s.length())
                    max[i] = s.length();
                else
                    max[i] += n;
                if (max[i] > maxmax) {
                    maxmax = max[i];
                    maxind = i;
                    maxcnt = 1;
                } else if (max[i] == maxmax) {
                    maxcnt++;
                }
            }
            if (maxcnt > 1) {
                out.println("Draw");
            } else
                out.println(names[maxind]);

        }

    }

    static class FastScanner {
        private BufferedReader in;
        private StringTokenizer st;

        public FastScanner(InputStream stream) {
            in = new BufferedReader(new InputStreamReader(stream));
        }

        public String ns() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    String rl = in.readLine();
                    if (rl == null) {
                        return null;
                    }
                    st = new StringTokenizer(rl);
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return st.nextToken();
        }

        public int ni() {
            return Integer.parseInt(ns());
        }

    }
}


import java.util.*;

public class Main {
    static ArrayList<ArrayList<Integer>> tree = new ArrayList<>();

    public static int size(int from, int exclude) {
        int size = 1;
        for (Integer v : tree.get(from)) {
            if (v != exclude) {
                size += size(v, from);
            }
        }
        return size;
    }

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
//        long n = in.nextLong();
//        int x = in.nextInt();
//        int y = in.nextInt();
//        for (int i = 0; i < n+1; ++i) {
//            tree.add(new ArrayList<>());
//        }
//        for (int i = 0; i < n-1; ++i) {
//            int a = in.nextInt();
//            int b = in.nextInt();
//            tree.get(a).add(b);
//            tree.get(b).add(a);
//        }
//        Queue<Integer> queue = new ArrayDeque<>();
//        int beforeY = 0;
//        int beforeX = 0;
//        for (Integer v : tree.get(x)) {
//            queue.clear();
//            queue.add(v);
//            boolean found = false;
//
//            while (!queue.isEmpty()) {
//                Integer currVertex = queue.poll();
//                for (Integer vertex : tree.get(currVertex)) {
//                    if (vertex == y) {
//                        found = true;
//                        beforeY = currVertex;
//                        break;
//                    }
//                    if (vertex != currVertex) {
//                        queue.add(vertex);
//                    }
//                }
//                if (found) {
//                    break;
//                }
//            }
//
//            if (found) {
//                beforeX = v;
//                break;
//            }
//        }
//        long sizeX = size(x, beforeX);
//        long sizeY = size(y, beforeY);
//        System.out.println(n*(n-1) - sizeX*sizeY);

        String[] names = {"Kuro", "Shiro", "Katie"};
        long n = in.nextLong();
        String[] lines = {in.next(), in.next(),  in.next()};
        int[][] charCount = new int[3][256];
        int[] max = new int[3];
        for (int s_i = 0; s_i < 3; ++ s_i) {
            for (int i = 0; i < lines[s_i].length(); ++i) {
                charCount[s_i][lines[s_i].charAt(i)]++;
                if (charCount[s_i][lines[s_i].charAt(i)] > max[s_i]) {
                    max[s_i] = charCount[s_i][lines[s_i].charAt(i)];
                }
            }
        }
        int length = lines[0].length();
        for (int i = 0; i < 3; ++i) {
            if (max[i] == length) {
                max[i] -= 2;
            }
        }
        int[] max_cp = Arrays.copyOf(max, 3);
        Arrays.sort(max_cp);

        if (max_cp[1] + n >= length || max_cp[2] == max_cp[1]) {
            System.out.println("Draw");
            return;
        }
        for (int i = 0; i < 3; ++i) {
            if (max[i] == max_cp[2]) {
                System.out.println(names[i]);
                return;
            }
        }
    }
}


import java.util.Arrays;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String[] names = {"Kuro", "Shiro", "Katie"};
        long n = in.nextLong();
        String[] lines = {in.next(), in.next(),  in.next()};
        int[][] charCount = new int[3][256];
        int[] max = new int[3];
        for (int s_i = 0; s_i < 3; ++ s_i) {
            for (int i = 0; i < lines[s_i].length(); ++i) {
                charCount[s_i][lines[s_i].charAt(i)]++;
                if (charCount[s_i][lines[s_i].charAt(i)] > max[s_i]) {
                    max[s_i] = charCount[s_i][lines[s_i].charAt(i)];
                }
            }
        }
        int[] max_cp = Arrays.copyOf(max, 3);
        Arrays.sort(max_cp);
        int length = lines[0].length();
        if (max_cp[1] + n >= length || max_cp[2] == max_cp[1]) {
            System.out.println("Draw");
            return;
        }
        for (int i = 0; i < 3; ++i) {
            if (max[i] == max_cp[2]) {
                System.out.println(names[i]);
                return;
            }
        }
    }
}


import java.util.*;

public class Main {
    static ArrayList<ArrayList<Integer>> tree = new ArrayList<>();

    public static int size(int from, int exclude) {
        int size = 1;
        for (Integer v : tree.get(from)) {
            if (v != exclude) {
                size += size(v, from);
            }
        }
        return size;
    }

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
//        long n = in.nextLong();
//        int x = in.nextInt();
//        int y = in.nextInt();
//        for (int i = 0; i < n+1; ++i) {
//            tree.add(new ArrayList<>());
//        }
//        for (int i = 0; i < n-1; ++i) {
//            int a = in.nextInt();
//            int b = in.nextInt();
//            tree.get(a).add(b);
//            tree.get(b).add(a);
//        }
//        Queue<Integer> queue = new ArrayDeque<>();
//        int beforeY = 0;
//        int beforeX = 0;
//        for (Integer v : tree.get(x)) {
//            queue.clear();
//            queue.add(v);
//            boolean found = false;
//
//            while (!queue.isEmpty()) {
//                Integer currVertex = queue.poll();
//                for (Integer vertex : tree.get(currVertex)) {
//                    if (vertex == y) {
//                        found = true;
//                        beforeY = currVertex;
//                        break;
//                    }
//                    if (vertex != currVertex) {
//                        queue.add(vertex);
//                    }
//                }
//                if (found) {
//                    break;
//                }
//            }
//
//            if (found) {
//                beforeX = v;
//                break;
//            }
//        }
//        long sizeX = size(x, beforeX);
//        long sizeY = size(y, beforeY);
//        System.out.println(n*(n-1) - sizeX*sizeY);

        String[] names = {"Kuro", "Shiro", "Katie"};
        long n = in.nextLong();
        String[] lines = {in.next(), in.next(),  in.next()};
        int[][] charCount = new int[3][256];
        int[] max = new int[3];
        for (int s_i = 0; s_i < 3; ++ s_i) {
            for (int i = 0; i < lines[s_i].length(); ++i) {
                charCount[s_i][lines[s_i].charAt(i)]++;
                if (charCount[s_i][lines[s_i].charAt(i)] > max[s_i]) {
                    max[s_i] = charCount[s_i][lines[s_i].charAt(i)];
                }
            }
        }

        int length = lines[0].length();
        if (n != 0) {
            for (int i = 0; i < 3; ++i) {
                if (max[i] == length) {
                    max[i] -= 2;
                }
            }
        }
        int[] max_cp = Arrays.copyOf(max, 3);
        Arrays.sort(max_cp);

        if (max_cp[1] + n >= length || max_cp[2] == max_cp[1]) {
            System.out.println("Draw");
            return;
        }
        for (int i = 0; i < 3; ++i) {
            if (max[i] == max_cp[2]) {
                System.out.println(names[i]);
                return;
            }
        }
    }
}


import java.io.*;
import java.util.*;
public class B{
	public static void main(String[] args)throws Throwable {
		MyScanner sc=new MyScanner();
		PrintWriter pw=new PrintWriter(System.out);

		int n=sc.nextInt();
		int [] c=new int[125];
		String x=sc.next();
		int mx1=0;
		for(char s : x.toCharArray()) {
			c[s]++;
			mx1=Math.max(mx1, c[s]);
		}
		Arrays.fill(c, 0);
		String y=sc.next();
		int mx2=0;
		for(char s : y.toCharArray()) {
			c[s]++;
			mx2=Math.max(mx2, c[s]);
		}
		Arrays.fill(c, 0);
		String z=sc.next();
		int mx3=0;
		for(char s : z.toCharArray()) {
			c[s]++;
			mx3=Math.max(mx3, c[s]);
		}
		int ans1=Math.min(x.length(), mx1+n);
		int ans2=Math.min(x.length(), mx2+n);
		int ans3=Math.min(x.length(), mx3+n);
		if(ans1>ans2 && ans1>ans3)
			pw.println("Kuro");
		else
			if(ans2>ans1 && ans2>ans3)
				pw.println("Shiro");
			else
				if(ans3>ans1 && ans3>ans2)
					pw.println("Katie");
				else
					pw.println("Draw");

		pw.flush();
		pw.close();
    }

	static class MyScanner {
		BufferedReader br;
		StringTokenizer st;
		public MyScanner() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}
		String next() {while (st == null || !st.hasMoreElements()) {
			try {st = new StringTokenizer(br.readLine());}
			catch (IOException e) {e.printStackTrace();}}
		return st.nextToken();}
		int nextInt() {return Integer.parseInt(next());}
		long nextLong() {return Long.parseLong(next());}
		double nextDouble() {return Double.parseDouble(next());}
		String nextLine(){String str = "";
		try {str = br.readLine();}
		catch (IOException e) {e.printStackTrace();}
		return str;}
	}
}


import java.io.*;
import java.util.*;
public class B{
	public static void main(String[] args)throws Throwable {
		MyScanner sc=new MyScanner();
		PrintWriter pw=new PrintWriter(System.out);

		int n=sc.nextInt();
		int [] c=new int[125];
		String x=sc.next();
		int mx1=0;
		for(char s : x.toCharArray()) {
			c[s]++;
			mx1=Math.max(mx1, c[s]);
		}
		Arrays.fill(c, 0);
		String y=sc.next();
		int mx2=0;
		for(char s : y.toCharArray()) {
			c[s]++;
			mx2=Math.max(mx2, c[s]);
		}
		Arrays.fill(c, 0);
		String z=sc.next();
		int mx3=0;
		for(char s : z.toCharArray()) {
			c[s]++;
			mx3=Math.max(mx3, c[s]);
		}
		int ans1=Math.min(x.length(), mx1+n);
		if(n==1 && mx1==n)
			ans1--;
		int ans2=Math.min(x.length(), mx2+n);
		if(n==1 && mx2==n)
			ans2--;
		int ans3=Math.min(x.length(), mx3+n);
		if(n==1 && mx3==n)
			ans3--;

//		System.err.println(ans1+" "+ans2+" "+ans3);
		if(ans1>ans2 && ans1>ans3)
			pw.println("Kuro");
		else
			if(ans2>ans1 && ans2>ans3)
				pw.println("Shiro");
			else
				if(ans3>ans1 && ans3>ans2)
					pw.println("Katie");
				else
					pw.println("Draw");

		pw.flush();
		pw.close();
    }

	static class MyScanner {
		BufferedReader br;
		StringTokenizer st;
		public MyScanner() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}
		String next() {while (st == null || !st.hasMoreElements()) {
			try {st = new StringTokenizer(br.readLine());}
			catch (IOException e) {e.printStackTrace();}}
		return st.nextToken();}
		int nextInt() {return Integer.parseInt(next());}
		long nextLong() {return Long.parseLong(next());}
		double nextDouble() {return Double.parseDouble(next());}
		String nextLine(){String str = "";
		try {str = br.readLine();}
		catch (IOException e) {e.printStackTrace();}
		return str;}
	}
}


import java.io.*;
import java.util.*;
public class B{
	public static void main(String[] args)throws Throwable {
		MyScanner sc=new MyScanner();
		PrintWriter pw=new PrintWriter(System.out);

		int n=sc.nextInt();
		int [] c=new int[125];
		String x=sc.next();
		int mx1=0;
		for(char s : x.toCharArray()) {
			c[s]++;
			mx1=Math.max(mx1, c[s]);
		}
		Arrays.fill(c, 0);
		String y=sc.next();
		int mx2=0;
		for(char s : y.toCharArray()) {
			c[s]++;
			mx2=Math.max(mx2, c[s]);
		}
		Arrays.fill(c, 0);
		String z=sc.next();
		int mx3=0;
		for(char s : z.toCharArray()) {
			c[s]++;
			mx3=Math.max(mx3, c[s]);
		}
		int ans1=0;
		if(mx1+n<=x.length())
			ans1=mx1+n;
		else {
			ans1=n;
			if((mx1+n-x.length())%2==1)
				ans1--;
		}
		int ans2=0;
		if(mx2+n<=x.length())
			ans2=mx2+n;
		else {
			ans2=n;
			if((mx2+n-x.length())%2==1)
				ans2--;
		}
		int ans3=0;
		if(mx3+n<=x.length())
			ans3=mx3+n;
		else {
			ans3=n;
			if((mx3+n-x.length())%2==1)
				ans3--;
		}
//		System.err.println(ans1+" "+ans2+" "+ans3);
		if(ans1>ans2 && ans1>ans3)
			pw.println("Kuro");
		else
			if(ans2>ans1 && ans2>ans3)
				pw.println("Shiro");
			else
				if(ans3>ans1 && ans3>ans2)
					pw.println("Katie");
				else
					pw.println("Draw");

		pw.flush();
		pw.close();
    }

	static class MyScanner {
		BufferedReader br;
		StringTokenizer st;
		public MyScanner() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}
		String next() {while (st == null || !st.hasMoreElements()) {
			try {st = new StringTokenizer(br.readLine());}
			catch (IOException e) {e.printStackTrace();}}
		return st.nextToken();}
		int nextInt() {return Integer.parseInt(next());}
		long nextLong() {return Long.parseLong(next());}
		double nextDouble() {return Double.parseDouble(next());}
		String nextLine(){String str = "";
		try {str = br.readLine();}
		catch (IOException e) {e.printStackTrace();}
		return str;}
	}
}


import java.io.*;
import java.util.*;
public class B{
	public static void main(String[] args)throws Throwable {
		MyScanner sc=new MyScanner();
		PrintWriter pw=new PrintWriter(System.out);

		int n=sc.nextInt();
		int [] c=new int[125];
		String x=sc.next();
		int mx1=0;
		for(char s : x.toCharArray()) {
			c[s]++;
			mx1=Math.max(mx1, c[s]);
		}
		Arrays.fill(c, 0);
		String y=sc.next();
		int mx2=0;
		for(char s : y.toCharArray()) {
			c[s]++;
			mx2=Math.max(mx2, c[s]);
		}
		Arrays.fill(c, 0);
		String z=sc.next();
		int mx3=0;
		for(char s : z.toCharArray()) {
			c[s]++;
			mx3=Math.max(mx3, c[s]);
		}
		int ans1=0;
		if(mx1+n<=x.length())
			ans1=mx1+n;
		else
			ans1=n;
		int ans2=0;
		if(mx2+n<=x.length())
			ans2=mx2+n;
		else
			ans2=n;
		int ans3=0;
		if(mx3+n<=x.length())
			ans3=mx3+n;
		else
			ans3=n;
//		System.err.println(ans1+" "+ans2+" "+ans3);
		if(ans1>ans2 && ans1>ans3)
			pw.println("Kuro");
		else
			if(ans2>ans1 && ans2>ans3)
				pw.println("Shiro");
			else
				if(ans3>ans1 && ans3>ans2)
					pw.println("Katie");
				else
					pw.println("Draw");

		pw.flush();
		pw.close();
    }

	static class MyScanner {
		BufferedReader br;
		StringTokenizer st;
		public MyScanner() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}
		String next() {while (st == null || !st.hasMoreElements()) {
			try {st = new StringTokenizer(br.readLine());}
			catch (IOException e) {e.printStackTrace();}}
		return st.nextToken();}
		int nextInt() {return Integer.parseInt(next());}
		long nextLong() {return Long.parseLong(next());}
		double nextDouble() {return Double.parseDouble(next());}
		String nextLine(){String str = "";
		try {str = br.readLine();}
		catch (IOException e) {e.printStackTrace();}
		return str;}
	}
}


import java.io.*;
import java.util.*;
public class B{
	public static void main(String[] args)throws Throwable {
		MyScanner sc=new MyScanner();
		PrintWriter pw=new PrintWriter(System.out);

		int n=sc.nextInt();
		int [] c=new int[125];
		String x=sc.next();

		int mx1=0;
		for(char s : x.toCharArray()) {
			c[s]++;
			mx1=Math.max(mx1, c[s]);
		}
		Arrays.fill(c, 0);
		String y=sc.next();
		int mx2=0;
		for(char s : y.toCharArray()) {
			c[s]++;
			mx2=Math.max(mx2, c[s]);
		}
		Arrays.fill(c, 0);
		String z=sc.next();
		int mx3=0;
		for(char s : z.toCharArray()) {
			c[s]++;
			mx3=Math.max(mx3, c[s]);
		}
		int ans1=Math.min(x.length(), mx1+n);
		if(n==1 && mx1==x.length())
			ans1--;
		int ans2=Math.min(x.length(), mx2+n);
		if(n==1 && mx2==x.length())
			ans2--;
		int ans3=Math.min(x.length(), mx3+n);
		if(n==1 && mx3==x.length())
			ans3--;

//		System.err.println(ans1+" "+ans2+" "+ans3);
		if(ans1>ans2 && ans1>ans3)
			pw.println("Kuro");
		else
			if(ans2>ans1 && ans2>ans3)
				pw.println("Shiro");
			else
				if(ans3>ans1 && ans3>ans2)
					pw.println("Katie");
				else
					pw.println("Draw");

		pw.flush();
		pw.close();
    }

	static class MyScanner {
		BufferedReader br;
		StringTokenizer st;
		public MyScanner() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}
		String next() {while (st == null || !st.hasMoreElements()) {
			try {st = new StringTokenizer(br.readLine());}
			catch (IOException e) {e.printStackTrace();}}
		return st.nextToken();}
		int nextInt() {return Integer.parseInt(next());}
		long nextLong() {return Long.parseLong(next());}
		double nextDouble() {return Double.parseDouble(next());}
		String nextLine(){String str = "";
		try {str = br.readLine();}
		catch (IOException e) {e.printStackTrace();}
		return str;}
	}
}


import java.util.*;
public class we {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        String k = sc.next();
        int Kuro = 1;
        HashMap<Character, Integer> freq = new HashMap<>();
        for (int i = 0; i < k.length(); i++) {
            freq.putIfAbsent(k.charAt(i), 0);
            freq.put(k.charAt(i), freq.get(k.charAt(i)) + 1);
            Kuro = Math.max(Kuro, freq.get(k.charAt(i)));
        }

        Kuro = Math.min(Kuro+n,k.length());
        freq = new HashMap<>();
        k = sc.next();
        int Shiro = 1;
        for (int i = 0; i < k.length(); i++) {
            freq.putIfAbsent(k.charAt(i), 0);
            freq.put(k.charAt(i), freq.get(k.charAt(i)) + 1);
            Shiro = Math.max(Shiro, freq.get(k.charAt(i)));
        }

        Shiro = Math.min(Shiro+n,k.length());
        k = sc.next();
        freq = new HashMap<>();
        int Katie = 1;
        for (int i = 0; i < k.length(); i++) {
            freq.putIfAbsent(k.charAt(i), 0);
            freq.put(k.charAt(i), freq.get(k.charAt(i)) + 1);
            Katie = Math.max(Katie, freq.get(k.charAt(i)));
        }

        Katie = Math.min(Katie+n,k.length());
        if (Kuro > Shiro && Kuro > Katie)
            System.out.print("Kuro");
        else if (Shiro > Kuro && Shiro > Katie)
            System.out.print("Shiro");
        else if (Katie > Kuro && Katie > Shiro)
            System.out.print("Katie");
        else

            System.out.print("Draw");

    }
}


import java.util.*;
public class we {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        String k = sc.next();
        int Kuro = 1;
        HashMap<Character, Integer> freq = new HashMap<>();
        for (int i = 0; i < k.length(); i++) {
            freq.putIfAbsent(k.charAt(i), 0);
            freq.put(k.charAt(i), freq.get(k.charAt(i)) + 1);
            Kuro = Math.max(Kuro, freq.get(k.charAt(i)));
        }
        if(n%2==0&&n>Kuro){
     Kuro=k.length();
        }
        else
    Kuro = Math.min(Kuro+n,k.length());
        freq = new HashMap<>();
        k = sc.next();
        int Shiro = 1;
        for (int i = 0; i < k.length(); i++) {
            freq.putIfAbsent(k.charAt(i), 0);
            freq.put(k.charAt(i), freq.get(k.charAt(i)) + 1);
            Shiro = Math.max(Shiro, freq.get(k.charAt(i)));
        }

        if(n%2==0&&n>Shiro){
            Shiro=k.length()-1;
        }
        else
        Shiro = Math.min(Shiro+n,k.length());
        k = sc.next();
        freq = new HashMap<>();
        int Katie = 1;
        for (int i = 0; i < k.length(); i++) {
            freq.putIfAbsent(k.charAt(i), 0);
            freq.put(k.charAt(i), freq.get(k.charAt(i)) + 1);
            Katie = Math.max(Katie, freq.get(k.charAt(i)));
        }
        if(n%2==0&&n>Katie){
            Katie=k.length()-1;
        }
        else
        Katie = Math.min(Katie+n,k.length());
        if (Kuro > Shiro && Kuro > Katie)
            System.out.print("Kuro");
        else if (Shiro > Kuro && Shiro > Katie)
            System.out.print("Shiro");
        else if (Katie > Kuro && Katie > Shiro)
            System.out.print("Katie");
        else

            System.out.print("Draw");

    }
}


import java.io.*;
import java.util.*;
public class d{
    public static void main(String args[]) throws IOException {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader sc = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        int n = sc.nextInt();
        String[] str = new String[3];
        for (int i = 0; i < 3; i++)
            str[i] = sc.next();
        int[] count = new int[3];
        HashMap<Character, Integer> freq = new HashMap<>();
        for (int i = 0; i < 3; i++) {
            int max = Integer.MIN_VALUE;
            for (int j = 0; j < str[i].length(); j++) {
                char c = str[i].charAt(j);
                freq.put(c, freq.getOrDefault(c, 0) + 1);
                max = Math.max(freq.get(c), max);
            }
            int l = str[i].length();
            int x = l - (n + max);
            count[i] = x > 0 ? max + n : ((max + n - l) % 2 == 0 ? l : l - 1);
            freq.clear();
        }
        if (count[0] > count[1] && count[0] > count[2])
            out.print("Kuro");
        else if (count[1] > count[0] && count[1] > count[2])
            out.print("Shiro");
        else if (count[2] > count[0] && count[2] > count[1])
            out.print("Katie");
        else
            out.print("Draw");
        out.close();
    }
    public static void shuffle(long[] arr) {
        int n = arr.length;
        Random rnd = new Random();
        for (int i = 0; i < n; ++i) {
            long tmp = arr[i];
            int randomPos = i + rnd.nextInt(n - i);
            arr[i] = arr[randomPos];
            arr[randomPos] = tmp;
        }
    }
    public static void shuffle(int[] arr) {
        int n = arr.length;
        Random rnd = new Random();
        for (int i = 0; i < n; ++i) {
            int tmp = arr[i];
            int randomPos = i + rnd.nextInt(n - i);
            arr[i] = arr[randomPos];
            arr[randomPos] = tmp;
        }
    }

    public static int gcd(int x, int y) {
        if (y == 0)
            return x;
        return gcd(y, x % y);
    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.valueOf(next());
        }

        public double nextDouble() {
            return Double.valueOf(next());
        }

        String nextLine() throws IOException {
            return reader.readLine();
        }

    }
}


import java.io.*;
import java.util.*;
public class d{
    public static void main(String args[]) throws IOException {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader sc = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        int n = sc.nextInt();
        String[] str = new String[3];
        for (int i = 0; i < 3; i++)
            str[i] = sc.next();
        int[] count = new int[3];
        HashMap<Character, Integer> freq = new HashMap<>();
        for (int i = 0; i < 3; i++) {
            int max = Integer.MIN_VALUE;
            for (int j = 0; j < str[i].length(); j++) {
                char c = str[i].charAt(j);
                freq.put(c, freq.getOrDefault(c, 0) + 1);
                max = Math.max(freq.get(c), max);
            }
            int l = str[i].length();
            int x =l-max;
            count[i] = x >=n ? max + n : (n==1 ? l-1 : l);
            freq.clear();
        }
        if (count[0] > count[1] && count[0] > count[2])
            out.print("Kuro");
        else if (count[1] > count[0] && count[1] > count[2])
            out.print("Shiro");
        else if (count[2] > count[0] && count[2] > count[1])
            out.print("Katie");
        else
            out.print("Draw");
        out.close();
    }
    public static void shuffle(long[] arr) {
        int n = arr.length;
        Random rnd = new Random();
        for (int i = 0; i < n; ++i) {
            long tmp = arr[i];
            int randomPos = i + rnd.nextInt(n - i);
            arr[i] = arr[randomPos];
            arr[randomPos] = tmp;
        }
    }
    public static void shuffle(int[] arr) {
        int n = arr.length;
        Random rnd = new Random();
        for (int i = 0; i < n; ++i) {
            int tmp = arr[i];
            int randomPos = i + rnd.nextInt(n - i);
            arr[i] = arr[randomPos];
            arr[randomPos] = tmp;
        }
    }

    public static int gcd(int x, int y) {
        if (y == 0)
            return x;
        return gcd(y, x % y);
    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.valueOf(next());
        }

        public double nextDouble() {
            return Double.valueOf(next());
        }

        String nextLine() throws IOException {
            return reader.readLine();
        }

    }
}


import java.util.*;
public class we {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        String k = sc.next();
        int Kuro = 1;
        boolean flag=  true;
        if (n>k.length()&&gcd(k.length(),n)!=0)
            flag=true;
        else
            flag=false;

        HashMap<Character, Integer> freq = new HashMap<>();
        for (int i = 0; i < k.length(); i++) {
            freq.putIfAbsent(k.charAt(i), 0);
            freq.put(k.charAt(i), freq.get(k.charAt(i)) + 1);
            Kuro = Math.max(Kuro, freq.get(k.charAt(i)));
        }
        if (flag && n > k.length()) {
            Kuro = k.length();
        } else
            if(n>k.length())
                Kuro=k.length()-1;
        else
            Kuro = Math.min(Kuro + n, k.length());
        freq = new HashMap<>();
        k = sc.next();
        int Shiro = 1;
        for (int i = 0; i < k.length(); i++) {
            freq.putIfAbsent(k.charAt(i), 0);
            freq.put(k.charAt(i), freq.get(k.charAt(i)) + 1);
            Shiro = Math.max(Shiro, freq.get(k.charAt(i)));
        }

        if (flag && n > k.length()) {
            Shiro = k.length();
        } else
        if(n>k.length())
            Shiro=k.length()-1;
        else
            Shiro = Math.min(Shiro + n, k.length());
        k = sc.next();
        freq = new HashMap<>();
        int Katie = 1;
        for (int i = 0; i < k.length(); i++) {
            freq.putIfAbsent(k.charAt(i), 0);
            freq.put(k.charAt(i), freq.get(k.charAt(i)) + 1);
            Katie = Math.max(Katie, freq.get(k.charAt(i)));
        }
        if (flag && n > k.length()) {
            Katie = k.length();
        } else
        if(n>k.length())
            Katie=k.length()-1;
        else
            Katie = Math.min(Katie + n, k.length());
        if (Kuro > Shiro && Kuro > Katie)
            System.out.print("Kuro");
        else if (Shiro > Kuro && Shiro > Katie)
            System.out.print("Shiro");
        else if (Katie > Kuro && Katie > Shiro)
            System.out.print("Katie");
        else
            System.out.print("Draw");
    }
    static int gcd(int a, int b)
    {
        if (a == 0)
            return b;
        return gcd(b%a, a);
    }
}


import java.util.Scanner;

public class TreasureHunt {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		String a = s.next();
		String b = s.next();
		String c = s.next();
		int[] arr = new int[58];
		int[] brr = new int[58];
		int[] crr = new int[58];
		int max = -1;
		int ans1=0, ans2=0,ans3=0;
		for (int i = 0; i < a.length(); i++) {
			arr[a.charAt(i) - 'A']++;
			if (arr[a.charAt(i) - 'A'] > max) {
				max = arr[a.charAt(i) - 'A'];
			}
		}
		if(a.length()-max>=n) {
			ans1 = max+n;
		}else {
			ans1 = a.length();
		}
		max=-1;

		for (int i = 0; i < b.length(); i++) {
			brr[b.charAt(i) - 'A']++;
			if (brr[b.charAt(i) - 'A'] > max) {
				max = brr[b.charAt(i) - 'A'];
			}
		}
		if(b.length()-max>=n) {
			ans2 = max+n;
		}else {
			ans2 = b.length();
		}
		max=-1;

		for (int i = 0; i < c.length(); i++) {
			crr[c.charAt(i) - 'A']++;
			if (crr[c.charAt(i) - 'A'] > max) {
				max = crr[c.charAt(i) - 'A'];
			}
		}
		if(c.length()-max>=n) {
			ans3 = max+n;
		}else {
			ans3 = b.length();
		}

		if(ans1>ans2 && ans1>ans3)  {
			System.out.println("Kuro");
		}else if(ans2>ans1 && ans2>ans3)  {
			System.out.println("Shiro");
		}
		else if(ans1<ans3 && ans3>ans2)  {
			System.out.println("Katie");
		}else {
			System.out.println("Draw");
		}
	}

}


import java.util.Scanner;

public class TreasureHunt {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		String a = s.next();
		String b = s.next();
		String c = s.next();
		int[] arr = new int[58];
		int[] brr = new int[58];
		int[] crr = new int[58];
		int max = -1;
		int ans1=0, ans2=0,ans3=0;
		for (int i = 0; i < a.length(); i++) {
			arr[a.charAt(i) - 'A']++;
			if (arr[a.charAt(i) - 'A'] > max) {
				max = arr[a.charAt(i) - 'A'];
			}
		}
		if(a.length()-max>=n) {
			ans1 = max+n;
		}else {
			ans1 = a.length();
		}
		if(max == a.length() && n==1) {
			ans1 = max-1;
		}
		max=-1;

		for (int i = 0; i < b.length(); i++) {
			brr[b.charAt(i) - 'A']++;
			if (brr[b.charAt(i) - 'A'] > max) {
				max = brr[b.charAt(i) - 'A'];
			}
		}
		if(b.length()-max>=n) {
			ans2 = max+n;
		}else {
			ans2 = b.length();
		}
		if(max == b.length() && n==1) {
			ans2 = max-1;
		}
		max=-1;

		for (int i = 0; i < c.length(); i++) {
			crr[c.charAt(i) - 'A']++;
			if (crr[c.charAt(i) - 'A'] > max) {
				max = crr[c.charAt(i) - 'A'];
			}
		}
		if(c.length()-max>=n) {
			ans3 = max+n;
		}else {
			ans3 = c.length();
		}
		if(max == c.length() && n==1) {
			ans3 = max-1;
		}

		System.out.print(ans1+" "+ans2+" "+ans3);
		if(ans1>ans2 && ans1>ans3)  {
			System.out.println("Kuro");
		}else if(ans2>ans1 && ans2>ans3)  {
			System.out.println("Shiro");
		}
		else if(ans1<ans3 && ans3>ans2)  {
			System.out.println("Katie");
		}else {
			System.out.println("Draw");
		}
	}

}


import java.util.Scanner;

public class TreasureHunt {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		String a = s.next();
		String b = s.next();
		String c = s.next();
		int[] arr = new int[58];
		int[] brr = new int[58];
		int[] crr = new int[58];
		int max = -1;
		int ans1=0, ans2=0,ans3=0;
		for (int i = 0; i < a.length(); i++) {
			arr[a.charAt(i) - 'A']++;
			if (arr[a.charAt(i) - 'A'] > max) {
				max = arr[a.charAt(i) - 'A'];
			}
		}
		if(a.length()-max>=n) {
			ans1 = max+n;
		}else {
			ans1 = a.length();
		}
		if(max == a.length() && n==1) {
			ans1 = max-1;
		}
		max=-1;

		for (int i = 0; i < b.length(); i++) {
			brr[b.charAt(i) - 'A']++;
			if (brr[b.charAt(i) - 'A'] > max) {
				max = brr[b.charAt(i) - 'A'];
			}
		}
		if(b.length()-max>=n) {
			ans2 = max+n;
		}else {
			ans2 = b.length();
		}
		if(max == b.length() && n==1) {
			ans2 = max-1;
		}
		max=-1;

		for (int i = 0; i < c.length(); i++) {
			crr[c.charAt(i) - 'A']++;
			if (crr[c.charAt(i) - 'A'] > max) {
				max = crr[c.charAt(i) - 'A'];
			}
		}
		if(c.length()-max>=n) {
			ans3 = max+n;
		}else {
			ans3 = c.length();
		}
		if(max == c.length() && n==1) {
			ans3 = max-1;
		}

	//	System.out.print(ans1+" "+ans2+" "+ans3);
		if(ans1>ans2 && ans1>ans3)  {
			System.out.println("Kuro");
		}else if(ans2>ans1 && ans2>ans3)  {
			System.out.println("Shiro");
		}
		else if(ans1<ans3 && ans3>ans2)  {
			System.out.println("Katie");
		}else {
			System.out.println("Draw");
		}
	}

}


import java.util.Scanner;

public class TreasureHunt {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		String a = s.next();
		String b = s.next();
		String c = s.next();
		int[] arr = new int[58];
		int[] brr = new int[58];
		int[] crr = new int[58];
		int max = -1;
		int ans1=0, ans2=0,ans3=0;
		for (int i = 0; i < a.length(); i++) {
			arr[a.charAt(i) - 'A']++;
			if (arr[a.charAt(i) - 'A'] > max) {
				max = arr[a.charAt(i) - 'A'];
			}
		}
		if(a.length()-max>=n) {
			ans1 = max+n;
		}else {
			ans1 = a.length();
		}
		max=-1;

		for (int i = 0; i < b.length(); i++) {
			brr[b.charAt(i) - 'A']++;
			if (brr[b.charAt(i) - 'A'] > max) {
				max = brr[b.charAt(i) - 'A'];
			}
		}
		if(b.length()-max>=n) {
			ans2 = max+n;
		}else {
			ans2 = b.length();
		}
		max=-1;

		for (int i = 0; i < c.length(); i++) {
			crr[c.charAt(i) - 'A']++;
			if (crr[c.charAt(i) - 'A'] > max) {
				max = crr[c.charAt(i) - 'A'];
			}
		}
		if(c.length()-max>=n) {
			ans3 = max+n;
		}else {
			ans3 = b.length();
		}

		if(ans1>ans2 && ans1>ans3)  {
			System.out.println("Kuroo");
		}else if(ans2>ans1 && ans2>ans3)  {
			System.out.println("Shiro");
		}
		else if(ans1<ans3 && ans3>ans2)  {
			System.out.println("Katie");
		}else {
			System.out.println("Draw");
		}
	}

}


import java.io.*;
import java.util.*;

public class Codeforces979B {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		PrintWriter pw = new PrintWriter(System.out);
		StringTokenizer st = new StringTokenizer(br.readLine());
		int n = Integer.parseInt(st.nextToken());
		st = new StringTokenizer(br.readLine());
		String kuro = st.nextToken();
		st = new StringTokenizer(br.readLine());
		String shiro = st.nextToken();
		st = new StringTokenizer(br.readLine());
		String katie = st.nextToken();

		int k = kuro.length();
		int[] kuroLetters = new int[256];
		int[] shiroLetters = new int[256];
		int[] katieLetters = new int[256];

		for (int i = 0; i < k; i++) {
			int p = (int) (kuro.charAt(i));
			kuroLetters[p]++;
		}
		for (int i = 0; i < k; i++) {
			int p = (int) (shiro.charAt(i));
			shiroLetters[p]++;
		}
		for (int i = 0; i < k; i++) {
			int p = (int) (katie.charAt(i));
			katieLetters[p]++;
		}

		int kuroMax = 0;
		int shiroMax = 0;
		int katieMax = 0;

		for (int i = 0; i < 256; i++) {
			kuroMax = Math.max(kuroMax, kuroLetters[i]);
			shiroMax = Math.max(shiroMax, shiroLetters[i]);
			katieMax = Math.max(katieMax, katieLetters[i]);
		}

		kuroMax = Math.min(kuroMax+n, k);
		shiroMax = Math.min(shiroMax+n, k);
		katieMax = Math.min(katieMax+n, k);

		if ((kuroMax > shiroMax) && (kuroMax > katieMax))
			System.out.println("Kuro");
		else if ((shiroMax > kuroMax) && (shiroMax > katieMax))
			System.out.println("Shiro");
		else if ((katieMax > shiroMax) && (kuroMax < katieMax))
			System.out.println("Katie");
		else
			System.out.println("Draw");
	}

}


import java.io.*;
import java.util.*;

public class Codeforces979B {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		PrintWriter pw = new PrintWriter(System.out);
		StringTokenizer st = new StringTokenizer(br.readLine());
		int n = Integer.parseInt(st.nextToken());
		st = new StringTokenizer(br.readLine());
		String kuro = st.nextToken();
		st = new StringTokenizer(br.readLine());
		String shiro = st.nextToken();
		st = new StringTokenizer(br.readLine());
		String katie = st.nextToken();

		int k = kuro.length();
		int[] kuroLetters = new int[256];
		int[] shiroLetters = new int[256];
		int[] katieLetters = new int[256];

		for (int i = 0; i < k; i++) {
			int p = (int) (kuro.charAt(i));
			kuroLetters[p]++;
		}
		for (int i = 0; i < k; i++) {
			int p = (int) (shiro.charAt(i));
			shiroLetters[p]++;
		}
		for (int i = 0; i < k; i++) {
			int p = (int) (katie.charAt(i));
			katieLetters[p]++;
		}

		int kuroMax = 0;
		int shiroMax = 0;
		int katieMax = 0;

		for (int i = 0; i < 256; i++) {
			kuroMax = Math.max(kuroMax, kuroLetters[i]);
			shiroMax = Math.max(shiroMax, shiroLetters[i]);
			katieMax = Math.max(katieMax, katieLetters[i]);
		}

		if ((kuroMax == k) && (n == 1))
			kuroMax = k-1;
		else
			kuroMax = Math.min(kuroMax+n, k);
		if ((shiroMax == k) && (n == 1))
			shiroMax = k-1;
		else
			shiroMax = Math.min(shiroMax+n, k);
		if ((katieMax == k) && (n == 1))
			katieMax = k-1;
		else
			katieMax = Math.min(katieMax+n, k);

		if ((kuroMax > shiroMax) && (kuroMax > katieMax))
			System.out.println("Kuro");
		else if ((shiroMax > kuroMax) && (shiroMax > katieMax))
			System.out.println("Shiro");
		else if ((katieMax > shiroMax) && (kuroMax < katieMax))
			System.out.println("Katie");
		else
			System.out.println("Draw");
	}

}


import java.util.*;

public class Treasure{
    public static void main(String[] args) throws Exception{
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        String[] ribbons = new String[3];

        for(int i = 0; i < 3; i++){
            ribbons[i] = sc.next();
        }

        int[][] charOccurence = new int[3][256];
        int[] maxOccurence = new int[3];

        int maxOverall = 0;
        int maxLocation = 0;

        //for all ribbons
        for(int i = 0; i < 3; i++){

            //figure out max occuring character for current ribbon
            for(int j = 0; j < ribbons[0].length(); j++){
                charOccurence[i][ribbons[i].charAt(j)]++;
                maxOccurence[i] = Math.max(charOccurence[i][ribbons[i].charAt(j)], maxOccurence[i]);
            }

            //if the max occuring character is occuring for the entire ribbon (the ribbon has only one character)
            //and we need to make one move only, then the maximum beauty of this ribbon is the length of the ribbon - 1
            if(maxOccurence[i] == ribbons[0].length() && n == 1){
                maxOccurence[i]--;
            }

            //if we need to make more than one move then do math
            else{
                maxOccurence[i] = Math.min(ribbons[0].length(), maxOccurence[i] + Math.min(ribbons[0].length() - maxOccurence[i], n));
            }

            if(maxOverall < maxOccurence[i]) {
                maxOverall = maxOccurence[i];
                maxLocation = i;
            }
        }

        boolean draw = false;
        for(int i = 0; i < 3; i++) {
            if (maxOccurence[i] == maxOverall && i != maxLocation) {
                draw = true;
            }
        }

        if(draw){
            System.out.println("Draw");
        }
        else{
            if(maxLocation == 0){
                System.out.println("Kuro");
            }
            else if(maxLocation == 1){
                System.out.println("Shiro");
            }
            else if(maxLocation == 2){
                System.out.println("Katie");
            }
        }

    }
}


import java.io.DataInputStream;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.TreeMap;

public class B{
    public static void main(String[] args) throws Exception{
        Parser ps = new Parser(System.in);

        int n = ps.nextInt();

        String[] ribbons = new String[3];
        for(int i = 0; i < 3; i++){
            ribbons[i] = ps.next();
        }

        int ribbonLength = ribbons[0].length();
        if(n >= ribbonLength){
            System.out.println("Draw");
            return;
        }

        int[][] charOccurence = new int[3][53];

        for(int i = 0; i < 3; i++){
            for(int j = 0; j < ribbonLength; j++){
                if(Character.isUpperCase(ribbons[i].charAt(j))){
                    charOccurence[i][ribbons[i].charAt(j)-39]++;
                }
                else{
                    charOccurence[i][ribbons[i].charAt(j)-97]++;
                }
            }
        }

        int[] maxChar = new int[3];
        for(int i = 0; i < 3; i++){
            for(int j = 0; j < 53; j++){
                maxChar[i] = Math.max(charOccurence[i][j], maxChar[i]);
            }
        }

        int max = 0;
        int whereMax = 0;
        for(int i = 0; i < maxChar.length; i++){
            if(max < maxChar[i]){
                max = Math.max(maxChar[i], max);
                whereMax = i;
            }

        }
        int secMax = 0;
        for(int i = 0; i < maxChar.length; i++){
            if(secMax < max && maxChar[i] > secMax && i != whereMax){
                secMax = maxChar[i];
            }
        }

        if(ribbonLength - secMax <= n){
            System.out.println("Draw");
            return;
        }

        boolean draw = false;
        for(int i = 0; i < maxChar.length; i++){
            if(maxChar[i] == max && whereMax != i){
                draw = true;
            }
        }

        if(draw){
            System.out.println("Draw");
        }
        else{
            if(whereMax == 0){
                System.out.println("Kuro");
            }
            else if(whereMax == 1){
                System.out.println("Shiro");
            }
            else{
                System.out.println("Katie");
            }
        }
    }

    static class Parser
    {
        final private int BUFFER_SIZE = 1 << 16;

        private DataInputStream din;
        private byte[] buffer;
        private int bufferPointer, bytesRead;

        public Parser(InputStream in)
        {
            din = new DataInputStream(in);
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public long nextLong() throws Exception
        {
            long ret = 0;
            byte c = read();
            while (c <= ' ') c = read();
            boolean neg = c == '-';
            if (neg) c = read();
            do
            {
                ret = ret * 10 + c - '0';
                c = read();
            } while (c > ' ');
            if (neg) return -ret;
            return ret;
        }

        //reads in the next string
        public String next() throws Exception
        {
            StringBuilder ret =  new StringBuilder();
            byte c = read();
            while (c <= ' ') c = read();
            do
            {
                ret = ret.append((char)c);
                c = read();
            } while (c > ' ');
            return ret.toString();
        }

        public int nextInt() throws Exception
        {
            int ret = 0;
            byte c = read();
            while (c <= ' ') c = read();
            boolean neg = c == '-';
            if (neg) c = read();
            do
            {
                ret = ret * 10 + c - '0';
                c = read();
            } while (c > ' ');
            if (neg) return -ret;
            return ret;
        }

        private void fillBuffer() throws Exception
        {
            bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
            if (bytesRead == -1) buffer[0] = -1;
        }

        private byte read() throws Exception
        {
            if (bufferPointer == bytesRead) fillBuffer();
            return buffer[bufferPointer++];
        }
    }
}


import java.util.*;

public class Treasure{
    public static void main(String[] args) throws Exception{
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        String[] ribbons = new String[3];

        for(int i = 0; i < 3; i++){
            ribbons[i] = sc.next();
        }

        int[][] charOccurence = new int[3][256];
        int[] maxOccurence = new int[3];

        int maxOverall = 0;
        int maxLocation = 0;

        //for all ribbons
        for(int i = 0; i < 3; i++){

            //figure out max occuring character for current ribbon
            for(int j = 0; j < ribbons[0].length(); j++){
                charOccurence[i][ribbons[i].charAt(j)]++;
                maxOccurence[i] = Math.max(charOccurence[i][ribbons[i].charAt(j)], maxOccurence[i]);
            }

            //if the max occuring character is occuring for the entire ribbon (the ribbon has only one character)
            //and we need to make one move only, then the maximum beauty of this ribbon is the length of the ribbon - 1
            if(maxOccurence[i] == ribbons[0].length() && n == 1){
                maxOccurence[i]--;
            }

            //if we need to make more than one move then do math
            else{
                maxOccurence[i] = Math.min(ribbons[0].length(), maxOccurence[i] + n);
            }

            if(maxOverall < maxOccurence[i]) {
                maxOverall = maxOccurence[i];
                maxLocation = i;
            }
        }

        boolean draw = false;
        for(int i = 0; i < 3; i++) {
            if (maxOccurence[i] == maxOverall && i != maxLocation) {
                draw = true;
            }
        }

        if(draw){
            System.out.println("Draw");
        }
        else{
            if(maxLocation == 0){
                System.out.println("Kuro");
            }
            else if(maxLocation == 1){
                System.out.println("Shiro");
            }
            else if(maxLocation == 2){
                System.out.println("Katie");
            }
        }

    }
}


import java.util.*;

public class Treasure{
    public static void main(String[] args) throws Exception{
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        String[] ribbons = new String[3];

        for(int i = 0; i < 3; i++){
            ribbons[i] = sc.next();
        }

        int[][] charOccurence = new int[3][256];
        int[] maxOccurence = new int[3];

        int maxOverall = 0;
        int maxLocation = 0;

        //for all ribbons
        for(int i = 0; i < 3; i++){

            //figure out max occuring character for current ribbon
            for(int j = 0; j < ribbons[0].length(); j++){
                charOccurence[i][ribbons[i].charAt(j)]++;
                maxOccurence[i] = Math.max(charOccurence[i][ribbons[i].charAt(j)], maxOccurence[i]);
            }

            //if the max occuring character is occuring for the entire ribbon (the ribbon has only one character)
            //and we need to make one move only, then the maximum beauty of this ribbon is the length of the ribbon - 1

                maxOccurence[i] = Math.min(ribbons[0].length(), maxOccurence[i] + Math.min(ribbons[0].length() - maxOccurence[i], n));

            if(maxOverall < maxOccurence[i]) {
                maxOverall = maxOccurence[i];
                maxLocation = i;
            }
        }

        boolean draw = false;
        for(int i = 0; i < 3; i++) {
            if (maxOccurence[i] == maxOverall && i != maxLocation) {
                draw = true;
            }
        }

        if(draw){
            System.out.println("Draw");
        }
        else{
            if(maxLocation == 0){
                System.out.println("Kuro");
            }
            else if(maxLocation == 1){
                System.out.println("Shiro");
            }
            else if(maxLocation == 2){
                System.out.println("Katie");
            }
        }

    }
}


import java.io.DataInputStream;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.TreeMap;

public class B{
    public static void main(String[] args) throws Exception{
        Parser ps = new Parser(System.in);

        int n = ps.nextInt();

        String[] ribbons = new String[3];
        for(int i = 0; i < 3; i++){
            ribbons[i] = ps.next();
        }

        int ribbonLength = ribbons[0].length();
        if(n >= ribbonLength){
            System.out.println("Draw");
            return;
        }

        int[][] charOccurence = new int[3][53];

        for(int i = 0; i < 3; i++){
            for(int j = 0; j < ribbonLength; j++){
                if(Character.isUpperCase(ribbons[i].charAt(j))){
                    charOccurence[i][ribbons[i].charAt(j)-39]++;
                }
                else{
                    charOccurence[i][ribbons[i].charAt(j)-97]++;
                }
            }
        }

        int[] maxChar = new int[3];
        for(int i = 0; i < 3; i++){
            for(int j = 0; j < 53; j++){
                maxChar[i] = Math.max(charOccurence[i][j], maxChar[i]);
            }
        }

        int max = 0;
        int whereMax = 0;
        for(int i = 0; i < maxChar.length; i++){
            if(max < maxChar[i]){
                max = Math.max(maxChar[i], max);
                whereMax = i;
            }

        }

        boolean draw = false;
        for(int i = 0; i < maxChar.length; i++){
            if(maxChar[i] == max && whereMax != i){
                draw = true;
            }
        }

        if(draw){
            System.out.println("Draw");
        }
        else{
            if(whereMax == 0){
                System.out.println("Kuro");
            }
            else if(whereMax == 1){
                System.out.println("Shiro");
            }
            else{
                System.out.println("Katie");
            }
        }
    }

    static class Parser
    {
        final private int BUFFER_SIZE = 1 << 16;

        private DataInputStream din;
        private byte[] buffer;
        private int bufferPointer, bytesRead;

        public Parser(InputStream in)
        {
            din = new DataInputStream(in);
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public long nextLong() throws Exception
        {
            long ret = 0;
            byte c = read();
            while (c <= ' ') c = read();
            boolean neg = c == '-';
            if (neg) c = read();
            do
            {
                ret = ret * 10 + c - '0';
                c = read();
            } while (c > ' ');
            if (neg) return -ret;
            return ret;
        }

        //reads in the next string
        public String next() throws Exception
        {
            StringBuilder ret =  new StringBuilder();
            byte c = read();
            while (c <= ' ') c = read();
            do
            {
                ret = ret.append((char)c);
                c = read();
            } while (c > ' ');
            return ret.toString();
        }

        public int nextInt() throws Exception
        {
            int ret = 0;
            byte c = read();
            while (c <= ' ') c = read();
            boolean neg = c == '-';
            if (neg) c = read();
            do
            {
                ret = ret * 10 + c - '0';
                c = read();
            } while (c > ' ');
            if (neg) return -ret;
            return ret;
        }

        private void fillBuffer() throws Exception
        {
            bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
            if (bytesRead == -1) buffer[0] = -1;
        }

        private byte read() throws Exception
        {
            if (bufferPointer == bytesRead) fillBuffer();
            return buffer[bufferPointer++];
        }
    }
}


import java.io.DataInputStream;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.TreeMap;

public class B{
    public static void main(String[] args) throws Exception{
        Parser ps = new Parser(System.in);

        int n = ps.nextInt();
        String[] ribbons = new String[3];

        for(int i = 0; i < 3; i++){
            ribbons[i] = ps.next();
        }

        int[][] charOccurence = new int[3][256];
        int[] maxOccurence = new int[3];

        int maxOverall = 0;
        int maxLocation = 0;

        for(int i = 0; i < 3; i++){
            for(int j = 0; j < ribbons[0].length(); j++){
                charOccurence[i][ribbons[i].charAt(j)]++;
                maxOccurence[i] = Math.max(charOccurence[i][ribbons[i].charAt(j)], maxOccurence[i]);
            }

            if(maxOccurence[i] == ribbons[0].length() && n == 1){
                maxOccurence[i]--;
            }
            else{
                maxOccurence[i] = Math.min(ribbons[0].length(), maxOccurence[i] + Math.min(ribbons[0].length() - maxOccurence[i], n));
            }

            if(maxOverall < maxOccurence[i]) {
                maxOverall = maxOccurence[i];
                maxLocation = i;
            }
        }

        boolean draw = false;
        for(int i = 0; i < 3; i++) {
            if (maxOccurence[i] == maxOverall && i != maxLocation) {
                draw = true;
            }
        }

        if(draw){
            System.out.println("Draw");
        }
        else{
            if(maxLocation == 0){
                System.out.println("Kuro");
            }
            else if(maxLocation == 1){
                System.out.println("Shiro");
            }
            else if(maxLocation == 2){
                System.out.println("Katie");
            }
        }

    }

    static class Parser
    {
        final private int BUFFER_SIZE = 1 << 16;

        private DataInputStream din;
        private byte[] buffer;
        private int bufferPointer, bytesRead;

        public Parser(InputStream in)
        {
            din = new DataInputStream(in);
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public long nextLong() throws Exception
        {
            long ret = 0;
            byte c = read();
            while (c <= ' ') c = read();
            boolean neg = c == '-';
            if (neg) c = read();
            do
            {
                ret = ret * 10 + c - '0';
                c = read();
            } while (c > ' ');
            if (neg) return -ret;
            return ret;
        }

        //reads in the next string
        public String next() throws Exception
        {
            StringBuilder ret =  new StringBuilder();
            byte c = read();
            while (c <= ' ') c = read();
            do
            {
                ret = ret.append((char)c);
                c = read();
            } while (c > ' ');
            return ret.toString();
        }

        public int nextInt() throws Exception
        {
            int ret = 0;
            byte c = read();
            while (c <= ' ') c = read();
            boolean neg = c == '-';
            if (neg) c = read();
            do
            {
                ret = ret * 10 + c - '0';
                c = read();
            } while (c > ' ');
            if (neg) return -ret;
            return ret;
        }

        private void fillBuffer() throws Exception
        {
            bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
            if (bytesRead == -1) buffer[0] = -1;
        }

        private byte read() throws Exception
        {
            if (bufferPointer == bytesRead) fillBuffer();
            return buffer[bufferPointer++];
        }
    }
}


import java.io.*;
import java.util.*;
import java.lang.*;
import java.math.*;
public class Main extends Thread  {
    boolean[] prime;
    FastScanner sc;
    PrintWriter pw;
    MathF mf;
    final class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        public FastScanner() {
            try {
                br = new BufferedReader(new InputStreamReader(System.in));
                st = new StringTokenizer(br.readLine());
            } catch (Exception e) {
                e.printStackTrace();
            }
        }

        public long nlo() {
            return Long.parseLong(next());
        }

        public String next() {
            if (st.hasMoreTokens()) return st.nextToken();
            try {
                st = new StringTokenizer(br.readLine());
            } catch (Exception e) {
                e.printStackTrace();
            }
            return st.nextToken();
        }

        public int ni() {
            return Integer.parseInt(next());
        }

        public String nli() {
            String line = "";
            if (st.hasMoreTokens()) line = st.nextToken();
            else try {
                return br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            while (st.hasMoreTokens()) line += " " + st.nextToken();
            return line;
        }

        public double nd() {
            return Double.parseDouble(next());
        }
    }
    final class MathF {
        long grtdiv(long x)
        {
            if(isPrime(x))
                return 1;
            else
            {
                long ans=0;
                long y=(long)Math.sqrt(x)+1;
                for(;y>=2;y--)
                {
                    if(x%y==0)
                        ans=Math.max(ans,Math.max(y,x/y));
                }
                return ans;
            }
        }
        boolean isPrime(long x)
        {
            for(int i=2;i*i<=x;i++)
            {
                if(x%i==0)
                {
                    return false;
                }
            }
            return true;
        }
        long[][] mul(long[][] arr,long[][] brr,int a,int b,int c,int d)
        {
            long[][] crr=new long[a][d];
            for(int i=0;i<a;i++)
            {
                for(int j=0;j<d;j++)
                {
                    for(int k=0;k<b;k++)
                    {
                        crr[i][j]+=(((arr[i][k]%1000000007)*(brr[k][j]%1000000007))%1000000007);
                    }
                }
            }
            return crr;
        }
        int sod(long a)
        {
            int ans=0;
            while(a!=0)
            {
                ans+=(a%10);
                a=a/10;
            }
            return ans;
        }
        long pow(long a,long b)
        {
            if(b==0)
                return 1;
            else
            {
                long x=pow(a,b/2);
                if(b%2==1)
                    return (x*x*a);
                else
                    return (x*x);
            }
        }
        public  long gcd(long a, long b) {
            return (b == 0 ? a : gcd(b, a % b));
        }
        public long exponent(long a,long b)
        {
            if(b==0)
                return 1;
            else
            {
                long x=exponent(a,b/2);
                x*=x;
                if(b%2==1)
                    x*=a;
                return x;
            }
        }
        public  int nod(long x) {
            int i = 0;
            while (x != 0) {
                i++;
                x = x / 10;
            }
            return i;
        }

        public  int nob(long x) {
            if(x==0)
                return 1;
            return (int) Math.floor(Math.log(x) / Math.log(2)) + 1;
        }

        public int[] FastradixSort(int[] f) {
            int[] to = new int[f.length];
            {
                int[] b = new int[65537];
                for (int i = 0; i < f.length; i++) b[1 + (f[i] & 0xffff)]++;
                for (int i = 1; i <= 65536; i++) b[i] += b[i - 1];
                for (int i = 0; i < f.length; i++) to[b[f[i] & 0xffff]++] = f[i];
                int[] d = f;
                f = to;
                to = d;
            }
            {
                int[] b = new int[65537];
                for (int i = 0; i < f.length; i++) b[1 + (f[i] >>> 16)]++;
                for (int i = 1; i <= 65536; i++) b[i] += b[i - 1];
                for (int i = 0; i < f.length; i++) to[b[f[i] >>> 16]++] = f[i];
                int[] d = f;
                f = to;
                to = d;
            }
            return f;
        }

        public  void Primesieve(int n) {
            prime=new boolean[n];
            for (int i = 0; i < n; i++)
                prime[i] = true;
            for (int p = 3; p * p < n; p+=2) {
                if (prime[p] == true) {
                    for (int i = p * p; i < n; i += p)
                        prime[i] = false;
                }
            }
        }
    }
    public Main(ThreadGroup t,Runnable r,String s,long d )
    {
        super(t,r,s,d);
    }
    public void run()
    {
        sc=new FastScanner();
        pw=new PrintWriter(System.out);
        mf=new MathF();
        solve();
        pw.flush();
        pw.close();
    }
    public static void main(String[] args)
    {
        new Main(null,null,"",1<<28).start();
    }

    /////////////----------------------------------------/////////////
    ////////////------------------MAIN-LOGIC-------------/////////////
    ////////////----------Remember dfs reqire ----------/////////////
    ///////////---------- thread  for stack size -------/////////////
    ////////////--------------------------------------///////////////
    ArrayList<Integer>[] adj;
    int[] visit;
    int[] mrr;
    public void solve(){
        long t=1;
        while(t-->0) {
            long n=sc.nlo();
            int[] arr,brr,crr;
            arr=new int[256];
            brr=new int[256];
            crr=new int[256];
            String str=sc.next();
            int l=str.length();
            for(int i=0;i<l;i++)
            {
                arr[str.charAt(i)]++;
            }
            str=sc.next();
            l=str.length();
            for(int i=0;i<l;i++)
            {
                brr[str.charAt(i)]++;
            }
            str=sc.next();
            l=str.length();
            for(int i=0;i<l;i++)
            {
                crr[str.charAt(i)]++;
            }
            long a=-1,b=-1,c=-1;
            for(int i=0;i<256;i++)
            {
                a=Math.max(a,arr[i]);
                b=Math.max(b,brr[i]);
                c=Math.max(c,crr[i]);
            }
            long N=n,k;
            k=(Math.min(l-a,n));
            n-=k;
            a+=k;
            if(n==1)
                a=l;
            else if(n>1)
                a=l-1;
            n=N;
            k=(Math.min(l-b,n));
            n-=k;
            b+=k;
            if(n==1)
                b=l;
            else if(n>1)
                b=l-1;
            n=N;
            k=(Math.min(l-c,n));
            n-=k;
            c+=k;
            if(n==1)
                c=l;
            else if(n>1)
                c=l-1;

            long max=Math.max(Math.max(a,b),c);
            if(a==max&&((b!=max)&&(c!=max)))
                pw.println("Kuro");
            else if(b==max&&((c!=max)&&(a!=max)))
                pw.println("Shiro");
            else if(c==max&&((b!=max)&&(a!=max)))
                pw.println("Katie");
            else
                pw.println("Draw");
        }
    }
}