import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;

public class Try
{

    static class InputReader {

		private final InputStream stream;
		private final byte[] buf = new byte[8192];
		private int curChar, snumChars;

		public InputReader(InputStream st) {
			this.stream = st;
		}

		public int read() {
			if (snumChars == -1)
				throw new InputMismatchException();
			if (curChar >= snumChars) {
				curChar = 0;
				try {
					snumChars = stream.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (snumChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}

		public int ni() {
			int c = read();
			while (isSpaceChar(c)) {
				c = read();
			}
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			int res = 0;
			do {
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public long nl() {
			int c = read();
			while (isSpaceChar(c)) {
				c = read();
			}
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			long res = 0;
			do {
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public int[] nia(int n) {
			int a[] = new int[n];
			for (int i = 0; i < n; i++) {
				a[i] = ni();
			}
			return a;
		}

		public String rs() {
			int c = read();
			while (isSpaceChar(c)) {
				c = read();
			}
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isSpaceChar(c));
			return res.toString();
		}

		public String nextLine() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isEndOfLine(c));
			return res.toString();
		}

		public boolean isSpaceChar(int c) {
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		private boolean isEndOfLine(int c) {
			return c == '\n' || c == '\r' || c == -1;
		}

	}

    static long mod=1000000007;
    static BigInteger bigInteger = new BigInteger("1000000007");
    static int n = (int)1e6;
    static boolean[] prime;
    static ArrayList<Integer> as;
    static void sieve() {
			Arrays.fill(prime	, true);
			prime[0] = prime[1] = false;
			for(int i = 2 ; i * i <= n ; ++i) {
				if(prime[i]) {
					for(int k = i * i; k< n ; k+=i) {
						prime[k] = false;
					}
				}
			}

		}
		static PrintWriter w = new PrintWriter(System.out);

    public static void main(String[] args)
    {

        InputReader sc = new InputReader(System.in);
        //PrintWriter w = new PrintWriter(System.out);

       /*
        prime  = new boolean[n + 1];
		sieve();
		prime[1] = false;
		*/
		/*
		as = new ArrayList<>();
		for(int i=2;i<=1000000;i++)
		{
		    if(prime[i])
		    as.add(i);
		}
		*/

       /*

	long a = sc.nl();

            BigInteger ans = new BigInteger("1");
            for (long i = 1; i < Math.sqrt(a); i++) {
                if (a % i == 0) {
                    if (a / i == i) {
                        ans = ans.multiply(BigInteger.valueOf(phi(i)));

                    } else {
                        ans = ans.multiply(BigInteger.valueOf(phi(i)));
                        ans = ans.multiply(BigInteger.valueOf(phi(a / i)));

                    }

                }
            }
            w.println(ans.mod(bigInteger));
            */

         // MergeSort ob = new MergeSort();
       // ob.sort(arr, 0, arr.length-1);
     int []ku = new int[58];
     int []sh = new int[58];
     int []ka = new int[58];
     int m = sc.ni();
     String k = sc.rs();
     String s = sc.rs();
     String kat = sc.rs();
     for(int i=0;i<k.length();i++)
     {

             ku[(int)k.charAt(i)-65]++;

     }
     for(int i=0;i<s.length();i++)
     {
                       sh[(int)s.charAt(i)-65]++;
     }
     for(int i=0;i<kat.length();i++)
     {

                       ka[(int)kat.charAt(i)-65]++;
     }
      int temp1 = 0;
      int temp2 = 0;
      int temp3 = 0;
      for(int i=0;i<58;i++)
      {
          if(temp1<ku[i])
              temp1 = ku[i];
          if(temp2<sh[i])
              temp2 = sh[i];
          if(temp3<ka[i])
              temp3 = ka[i];

      }
      temp1 = Math.min(temp1+m,k.length());
       temp2 = Math.min(temp2+m,s.length());
        temp3 = Math.min(temp3+m,kat.length());
        if(temp1 > temp2 && temp1 > temp3)
            w.println("Kuro");
        else if(temp2 > temp3 && temp2 > temp1)
            w.println("Shiro");
        else if(temp3 > temp1 && temp3 > temp2)
            w.println("Katie");
        else
            w.println("Draw");

w.close();

    }

     public static long modMultiply(long one, long two) {

		return (one % mod * two % mod) % mod;
	}
    static long fx(int m)
    {
        long re = 0;
        for(int i=1;i<=m;i++)
        {
            re += (long) (i / gcd(i,m));
        }
        return re;
    }
     static long gcd(long a, long b)
    {
	 if (a == 0)
	  return b;

	return gcd(b%a, a);
    }

     static long phi(long nx)
    {
        // Initialize result as n
        double result = nx;

        // Consider all prime factors of n and for
        // every prime factor p, multiply result
        // with (1 - 1/p)
        for (int p = 0; as.get(p) * as.get(p) <= nx; ++p)
        {
            // Check if p is a prime factor.
            if (nx % as.get(p) == 0)
            {
                // If yes, then update n and result
                while (nx % as.get(p) == 0)
                    nx /= as.get(p);
                result *= (1.0 - (1.0 / (double) as.get(p)));
            }
        }

        // If n has a prime factor greater than sqrt(n)
        // (There can be at-most one such prime factor)
        if (nx > 1)
            result *= (1.0 - (1.0 / (double) nx));

        return (long)result;

        //return(phi((long)result,k-1));

    }

    public static int primeFactors(int n)
    {
        int sum = 0;
        // Print the number of 2s that divide n
        while (n%2==0)
        {
            sum = 1;
            //System.out.print(2 + " ");
            n /= 2;
        }

        // n must be odd at this point.  So we can
        // skip one element (Note i = i +2)
        for (int i = 3; i <= Math.sqrt(n); i+= 2)
        {
            // While i divides n, print i and divide n
            while (n%i == 0)
            {

               // System.out.print(i + " ");
                n /= i;
            }
            sum++;
        }

        // This condition is to handle the case whien
        // n is a prime number greater than 2
        if (n > 2)
            sum++;
            return sum;
    }
    static int digitsum(int x)

    {

        int sum = 0;
        while(x > 0)
        {
            int temp = x % 10;
            sum += temp;
            x /= 10;
        }
        return sum;

    }
    static int countDivisors(int n)
    {
        int cnt = 0;
        for (int i = 1; i*i <=n; i++)
        {
             if (n % i == 0 && i<=1000000)
             {
                // If divisors are equal,
                // count only one
                if (n / i == i)
                   cnt++;

                else // Otherwise count both
                    cnt = cnt + 2;
             }
         }
        return cnt;
    }

    static boolean isprime(int n)
    {

    if(n == 2)
        return true;
    if(n == 3)
        return true;
    if(n % 2 == 0)
        return false;
    if(n % 3 == 0)
        return false;

    int i = 5;
   int w = 2;

    while(i * i <= n)
    {
        if(n % i == 0)
            return false;

        i += w;
        w = 6 - w;
    }

    return true;
    }

    static long log2(long value) {
    return Long.SIZE-Long.numberOfLeadingZeros(value);
}

    static boolean binarysearch(int []arr,int p,int n)
    {
        //ArrayList<Integer> as = new ArrayList<>();
        //as.addAll(0,at);
        //Collections.sort(as);
        boolean re = false;
        int st = 0;
        int end = n-1;

        while(st <= end)
        {
            int mid = st + (end-st)/2;

            if(p > as.get(mid))
            {
                st = mid+1;

            }
            else if(p < as.get(mid))
            {
                end = mid-1;

            }
            else if(p == as.get(mid))
            {

            re = true;
            break;
            }

        }
         return re;

    }

    static class Student
    {

        int position;
        int value;
        Student(int position,int value)
        {
            this.position = position;
            this.value = value;

        }

    }
    /* Java program for Merge Sort */
static class MergeSort
{
    // Merges two subarrays of arr[].
    // First subarray is arr[l..m]
    // Second subarray is arr[m+1..r]
    void merge(int arr[], int l, int m, int r)
    {
        // Find sizes of two subarrays to be merged
        int n1 = m - l + 1;
        int n2 = r - m;

        /* Create temp arrays */
        int L[] = new int [n1];
        int R[] = new int [n2];

        /*Copy data to temp arrays*/
        for (int i=0; i<n1; ++i)
            L[i] = arr[l + i];
        for (int j=0; j<n2; ++j)
            R[j] = arr[m + 1+ j];

        /* Merge the temp arrays */

        // Initial indexes of first and second subarrays
        int i = 0, j = 0;

        // Initial index of merged subarry array
        int k = l;
        while (i < n1 && j < n2)
        {
            if (L[i] <= R[j])
            {
                arr[k] = L[i];
                i++;
            }
            else
            {
                arr[k] = R[j];
                j++;
            }
            k++;
        }

        /* Copy remaining elements of L[] if any */
        while (i < n1)
        {
            arr[k] = L[i];
            i++;
            k++;
        }

        /* Copy remaining elements of R[] if any */
        while (j < n2)
        {
            arr[k] = R[j];
            j++;
            k++;
        }
    }

    // Main function that sorts arr[l..r] using
    // merge()
    void sort(int arr[], int l, int r)
    {
        if (l < r)
        {
            // Find the middle point
            int m = (l+r)/2;

            // Sort first and second halves
            sort(arr, l, m);
            sort(arr , m+1, r);

            // Merge the sorted halves
            merge(arr, l, m, r);
        }
    }

    /* A utility function to print array of size n */

}

    public static int ip(String s){
		return Integer.parseInt(s);
	}
	 public static String ips(int s){
		return Integer.toString(s);
	}

}


import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;

public class Try
{

    static class InputReader {

		private final InputStream stream;
		private final byte[] buf = new byte[8192];
		private int curChar, snumChars;

		public InputReader(InputStream st) {
			this.stream = st;
		}

		public int read() {
			if (snumChars == -1)
				throw new InputMismatchException();
			if (curChar >= snumChars) {
				curChar = 0;
				try {
					snumChars = stream.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (snumChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}

		public int ni() {
			int c = read();
			while (isSpaceChar(c)) {
				c = read();
			}
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			int res = 0;
			do {
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public long nl() {
			int c = read();
			while (isSpaceChar(c)) {
				c = read();
			}
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			long res = 0;
			do {
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public int[] nia(int n) {
			int a[] = new int[n];
			for (int i = 0; i < n; i++) {
				a[i] = ni();
			}
			return a;
		}

		public String rs() {
			int c = read();
			while (isSpaceChar(c)) {
				c = read();
			}
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isSpaceChar(c));
			return res.toString();
		}

		public String nextLine() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isEndOfLine(c));
			return res.toString();
		}

		public boolean isSpaceChar(int c) {
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		private boolean isEndOfLine(int c) {
			return c == '\n' || c == '\r' || c == -1;
		}

	}

    static long mod=1000000007;
    static BigInteger bigInteger = new BigInteger("1000000007");
    static int n = (int)1e6;
    static boolean[] prime;
    static ArrayList<Integer> as;
    static void sieve() {
			Arrays.fill(prime	, true);
			prime[0] = prime[1] = false;
			for(int i = 2 ; i * i <= n ; ++i) {
				if(prime[i]) {
					for(int k = i * i; k< n ; k+=i) {
						prime[k] = false;
					}
				}
			}

		}
		static PrintWriter w = new PrintWriter(System.out);

    public static void main(String[] args)
    {

        InputReader sc = new InputReader(System.in);
        //PrintWriter w = new PrintWriter(System.out);

       /*
        prime  = new boolean[n + 1];
		sieve();
		prime[1] = false;
		*/
		/*
		as = new ArrayList<>();
		for(int i=2;i<=1000000;i++)
		{
		    if(prime[i])
		    as.add(i);
		}
		*/

       /*

	long a = sc.nl();

            BigInteger ans = new BigInteger("1");
            for (long i = 1; i < Math.sqrt(a); i++) {
                if (a % i == 0) {
                    if (a / i == i) {
                        ans = ans.multiply(BigInteger.valueOf(phi(i)));

                    } else {
                        ans = ans.multiply(BigInteger.valueOf(phi(i)));
                        ans = ans.multiply(BigInteger.valueOf(phi(a / i)));

                    }

                }
            }
            w.println(ans.mod(bigInteger));
            */

         // MergeSort ob = new MergeSort();
       // ob.sort(arr, 0, arr.length-1);
        int []ku = new int[58];
     int []sh = new int[58];
     int []ka = new int[58];
     int m = sc.ni();
     String k = sc.rs();
     String s = sc.rs();
     String kat = sc.rs();
     for(int i=0;i<k.length();i++)
     {

             ku[(int)k.charAt(i)-65]++;

     }
     for(int i=0;i<s.length();i++)
     {
                       sh[(int)s.charAt(i)-65]++;
     }
     for(int i=0;i<kat.length();i++)
     {

                       ka[(int)kat.charAt(i)-65]++;
     }
      int temp1 = 0;
      int temp2 = 0;
      int temp3 = 0;
      int s1 = k.length();
      int s2 = s.length();
      int s3 = kat.length();

      for(int i=0;i<58;i++)
      {
          if(temp1<ku[i])
              temp1 = ku[i];
          if(temp2<sh[i])
              temp2 = sh[i];
          if(temp3<ka[i])
              temp3 = ka[i];

      }
      if(temp1 == s1 && m==1)
          s1--;
      if(temp2==s2 && m==1)
          s2--;
      if(temp3==s3 && m==1)
          s3--;
      temp1 = Math.min(temp1+m,s1);
       temp2 = Math.min(temp2+m,s2);
        temp3 = Math.min(temp3+m,s3);
        if(temp1 > temp2 && temp1 > temp3)
            w.println("Kuro");
        else if(temp2 > temp3 && temp2 > temp1)
            w.println("Shiro");
        else if(temp3 > temp1 && temp3 > temp2)
            w.println("Katie");
        else
            w.println("Draw");

w.close();

    }

     public static long modMultiply(long one, long two) {

		return (one % mod * two % mod) % mod;
	}
    static long fx(int m)
    {
        long re = 0;
        for(int i=1;i<=m;i++)
        {
            re += (long) (i / gcd(i,m));
        }
        return re;
    }
     static long gcd(long a, long b)
    {
	 if (a == 0)
	  return b;

	return gcd(b%a, a);
    }

     static long phi(long nx)
    {
        // Initialize result as n
        double result = nx;

        // Consider all prime factors of n and for
        // every prime factor p, multiply result
        // with (1 - 1/p)
        for (int p = 0; as.get(p) * as.get(p) <= nx; ++p)
        {
            // Check if p is a prime factor.
            if (nx % as.get(p) == 0)
            {
                // If yes, then update n and result
                while (nx % as.get(p) == 0)
                    nx /= as.get(p);
                result *= (1.0 - (1.0 / (double) as.get(p)));
            }
        }

        // If n has a prime factor greater than sqrt(n)
        // (There can be at-most one such prime factor)
        if (nx > 1)
            result *= (1.0 - (1.0 / (double) nx));

        return (long)result;

        //return(phi((long)result,k-1));

    }

    public static int primeFactors(int n)
    {
        int sum = 0;
        // Print the number of 2s that divide n
        while (n%2==0)
        {
            sum = 1;
            //System.out.print(2 + " ");
            n /= 2;
        }

        // n must be odd at this point.  So we can
        // skip one element (Note i = i +2)
        for (int i = 3; i <= Math.sqrt(n); i+= 2)
        {
            // While i divides n, print i and divide n
            while (n%i == 0)
            {

               // System.out.print(i + " ");
                n /= i;
            }
            sum++;
        }

        // This condition is to handle the case whien
        // n is a prime number greater than 2
        if (n > 2)
            sum++;
            return sum;
    }
    static int digitsum(int x)

    {

        int sum = 0;
        while(x > 0)
        {
            int temp = x % 10;
            sum += temp;
            x /= 10;
        }
        return sum;

    }
    static int countDivisors(int n)
    {
        int cnt = 0;
        for (int i = 1; i*i <=n; i++)
        {
             if (n % i == 0 && i<=1000000)
             {
                // If divisors are equal,
                // count only one
                if (n / i == i)
                   cnt++;

                else // Otherwise count both
                    cnt = cnt + 2;
             }
         }
        return cnt;
    }

    static boolean isprime(int n)
    {

    if(n == 2)
        return true;
    if(n == 3)
        return true;
    if(n % 2 == 0)
        return false;
    if(n % 3 == 0)
        return false;

    int i = 5;
   int w = 2;

    while(i * i <= n)
    {
        if(n % i == 0)
            return false;

        i += w;
        w = 6 - w;
    }

    return true;
    }

    static long log2(long value) {
    return Long.SIZE-Long.numberOfLeadingZeros(value);
}

    static boolean binarysearch(int []arr,int p,int n)
    {
        //ArrayList<Integer> as = new ArrayList<>();
        //as.addAll(0,at);
        //Collections.sort(as);
        boolean re = false;
        int st = 0;
        int end = n-1;

        while(st <= end)
        {
            int mid = st + (end-st)/2;

            if(p > as.get(mid))
            {
                st = mid+1;

            }
            else if(p < as.get(mid))
            {
                end = mid-1;

            }
            else if(p == as.get(mid))
            {

            re = true;
            break;
            }

        }
         return re;

    }

    static class Student
    {

        int position;
        int value;
        Student(int position,int value)
        {
            this.position = position;
            this.value = value;

        }

    }
    /* Java program for Merge Sort */
static class MergeSort
{
    // Merges two subarrays of arr[].
    // First subarray is arr[l..m]
    // Second subarray is arr[m+1..r]
    void merge(int arr[], int l, int m, int r)
    {
        // Find sizes of two subarrays to be merged
        int n1 = m - l + 1;
        int n2 = r - m;

        /* Create temp arrays */
        int L[] = new int [n1];
        int R[] = new int [n2];

        /*Copy data to temp arrays*/
        for (int i=0; i<n1; ++i)
            L[i] = arr[l + i];
        for (int j=0; j<n2; ++j)
            R[j] = arr[m + 1+ j];

        /* Merge the temp arrays */

        // Initial indexes of first and second subarrays
        int i = 0, j = 0;

        // Initial index of merged subarry array
        int k = l;
        while (i < n1 && j < n2)
        {
            if (L[i] <= R[j])
            {
                arr[k] = L[i];
                i++;
            }
            else
            {
                arr[k] = R[j];
                j++;
            }
            k++;
        }

        /* Copy remaining elements of L[] if any */
        while (i < n1)
        {
            arr[k] = L[i];
            i++;
            k++;
        }

        /* Copy remaining elements of R[] if any */
        while (j < n2)
        {
            arr[k] = R[j];
            j++;
            k++;
        }
    }

    // Main function that sorts arr[l..r] using
    // merge()
    void sort(int arr[], int l, int r)
    {
        if (l < r)
        {
            // Find the middle point
            int m = (l+r)/2;

            // Sort first and second halves
            sort(arr, l, m);
            sort(arr , m+1, r);

            // Merge the sorted halves
            merge(arr, l, m, r);
        }
    }

    /* A utility function to print array of size n */

}

    public static int ip(String s){
		return Integer.parseInt(s);
	}
	 public static String ips(int s){
		return Integer.toString(s);
	}

}


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

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

    static class TaskB {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int turns = in.nextInt();
            String[] players = new String[3];
            for (int i = 0; i < 3; i++) players[i] = in.next();
            int n = players[0].length();

            int[] c = new int[3];
            Arrays.fill(c, 0);
            for (int i = 0; i < 3; i++) {
                char[] s = players[i].toCharArray();
                HashMap<Character, Integer> hash = new HashMap<>();
                for (int j = 0; j < n; j++) {
                    if (!hash.containsKey(s[j])) hash.put(s[j], 0);
                    hash.replace(s[j], hash.get(s[j]) + 1);
                }

                for (int count : hash.values()) {
                    c[i] = Math.max(c[i], count);
                }
            }

            for (int i = 0; i < 3; i++) {
                int colorsLeft = n - c[i];
                int turnsLeft = turns;
                if (colorsLeft <= turnsLeft) {
                    c[i] += colorsLeft;
                    turnsLeft -= colorsLeft;
                } else {
                    c[i] += turnsLeft;
                    turnsLeft = 0;
                }

                if (turnsLeft > 0) {
                    c[i] -= turnsLeft % 2;
                }
            }

            int ans = Math.max(c[0], Math.max(c[1], c[2]));

            if ((c[0] == ans && c[1] == ans) || (c[0] == ans && c[2] == ans) || (c[1] == ans && c[2] == ans)) {
                out.println("Draw");
            } else if (c[0] > c[1] && c[0] > c[2]) {
                out.println("Kuro");
            } else if (c[1] > c[0] && c[1] > c[2]) {
                out.println("Shiro");
            } else if (c[2] > c[0] && c[2] > c[1]) {
                out.println("Katie");
            }
        }

    }

    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());
        }

    }
}


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

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

    static class TaskB {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int turns = in.nextInt();
            String[] players = new String[3];
            for (int i = 0; i < 3; i++) players[i] = in.next();
            int n = players[0].length();

            int[] c = new int[3];
            Arrays.fill(c, 0);
            for (int i = 0; i < 3; i++) {
                char[] s = players[i].toCharArray();
                HashMap<Character, Integer> hash = new HashMap<>();
                for (int j = 0; j < n; j++) {
                    if (!hash.containsKey(s[j])) hash.put(s[j], 0);
                    hash.replace(s[j], hash.get(s[j]) + 1);
                }

                for (int count : hash.values()) {
                    c[i] = Math.max(c[i], count);
                }
            }

            for (int i = 0; i < 3; i++) {
                int colorsLeft = n - c[i];
                int turnsLeft = turns;
                if (colorsLeft <= turnsLeft) {
                    c[i] += colorsLeft;
                    turnsLeft -= colorsLeft;
                } else {
                    c[i] += turnsLeft;
                    turnsLeft = 0;
                }

                if (turnsLeft > 0) {
                    c[i] -= turnsLeft % 2;
                }
            }

            if (c[0] == c[1] && c[1] == c[2]) {
                out.println("Draw");
            } else if (c[0] > c[1] && c[0] > c[2]) {
                out.println("Kuro");
            } else if (c[1] > c[0] && c[1] > c[2]) {
                out.println("Shiro");
            } else if (c[2] > c[0] && c[2] > c[1]) {
                out.println("Katie");
            }
        }

    }

    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());
        }

    }
}


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

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

    static class TaskB {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int turns = in.nextInt();
            String[] players = new String[3];
            for (int i = 0; i < 3; i++) players[i] = in.next();
            int n = players[0].length();

            if (turns >= n) {
                out.println("Draw");
                return;
            }

            int[] c = new int[3];
            Arrays.fill(c, 0);
            for (int i = 0; i < 3; i++) {
                char[] s = players[i].toCharArray();
                HashMap<Character, Integer> hash = new HashMap<>();
                for (int j = 0; j < n; j++) {
                    if (!hash.containsKey(s[j])) hash.put(s[j], 0);
                    hash.replace(s[j], hash.get(s[j]) + 1);
                }

                for (int count : hash.values()) {
                    c[i] = Math.max(c[i], count);
                }
            }

            if (c[0] == c[1] && c[1] == c[2]) {
                out.println("Draw");
            } else if (c[0] > c[1] && c[0] > c[2]) {
                out.println("Kuro");
            } else if (c[1] > c[0] && c[1] > c[2]) {
                out.println("Shiro");
            } else if (c[2] > c[0] && c[2] > c[1]) {
                out.println("Katie");
            }
        }

    }

    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());
        }

    }
}


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

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

    static class TaskB {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int turns = in.nextInt();
            String[] players = new String[3];
            for (int i = 0; i < 3; i++) players[i] = in.next();
            int n = players[0].length();

            int[] c = new int[3];
            Arrays.fill(c, 0);
            for (int i = 0; i < 3; i++) {
                char[] s = players[i].toCharArray();
                HashMap<Character, Integer> hash = new HashMap<>();
                for (int j = 0; j < n; j++) {
                    if (!hash.containsKey(s[j])) hash.put(s[j], 0);
                    hash.replace(s[j], hash.get(s[j]) + 1);
                }

                for (int count : hash.values()) {
                    c[i] = Math.max(c[i], count);
                }
            }

            int max = 0;
            for (int i = 0; i < 3; i++) {
                int colorsLeft = n - c[i];
                int turnsLeft = turns;
                if (colorsLeft <= turnsLeft) {
                    c[i] += colorsLeft;
                    if (colorsLeft == 0 && turnsLeft == 1) c[i]--;
                } else {
                    c[i] += turnsLeft;
                }
                max = Math.max(max, c[i]);
            }

            if ((c[0] == max && c[1] == max) || (c[0] == max && c[2] == max) || (c[1] == max && c[2] == max)) {
                out.println("Draw");
            } else if (c[0] > c[1] && c[0] > c[2]) {
                out.println("Kuro");
            } else if (c[1] > c[0] && c[1] > c[2]) {
                out.println("Shiro");
            } else if (c[2] > c[0] && c[2] > c[1]) {
                out.println("Katie");
            }
        }

    }

    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());
        }

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.StringTokenizer;
import java.io.BufferedReader;
import java.util.Collections;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
import java.io.InputStream;

public class Main4 {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		XeniaAndBitOperations solver = new XeniaAndBitOperations();
		solver.solve(1, in, out);
		out.close();
	}

	static class XeniaAndBitOperations {

		public void solve(int testNumber, InputReader in, PrintWriter out) {
			long n = in.nextLong();

			String kuro = in.next();
			int lenkuro = kuro.length();
			HashMap<Integer, Integer> kuromap = intialize();
			String shiro = in.next();
			HashMap<Integer, Integer> shiromap = intialize();
			int lenshiro = shiro.length();
			String katie = in.next();
			HashMap<Integer, Integer> katiemap = intialize();
			int lenkatie = katie.length();

			if (n > 100000)
				out.print("Draw");
			else {

				// max repeating count character for each
				for (int i = 0; i < lenkuro; i++) {
					int ch = kuro.charAt(i);
					kuromap.put(ch, kuromap.get(ch) + 1);
				}

				for (int i = 0; i < lenshiro; i++) {
					int ch = shiro.charAt(i);
					shiromap.put(ch, shiromap.get(ch) + 1);
				}

				for (int i = 0; i < lenkatie; i++) {
					int ch = katie.charAt(i);
					katiemap.put(ch, katiemap.get(ch) + 1);
				}

				int maxkuro = 0;
				for (Map.Entry<Integer, Integer> entry : kuromap.entrySet()) {

					if (entry.getValue() > maxkuro)
						maxkuro = entry.getValue();
				}

				int maxshiro = 0;
				for (Map.Entry<Integer, Integer> entry : shiromap.entrySet()) {

					if (entry.getValue() > maxshiro)
						maxshiro = entry.getValue();
				}

				int maxkatie = 0;
				for (Map.Entry<Integer, Integer> entry : katiemap.entrySet()) {

					if (entry.getValue() > maxkatie)
						maxkatie = entry.getValue();
				}

				if (n == 1) {
					if(lenkuro == maxkuro)
						maxkuro--;
					else if(lenkuro > maxkuro)
						maxkuro++;
					if(lenkuro == maxshiro)
						maxshiro--;
					else if(lenkuro > maxshiro)
						maxshiro++;
					if(lenkuro == maxkatie)
						maxkatie--;
					else if(lenkuro > maxkatie)
						maxkatie++;

				} else {
					if (lenkuro - maxkuro >= n)
						maxkuro += n;
					else {
						maxkuro = lenkuro;
					}

					if (lenkuro - maxshiro >= n)
						maxshiro += n;
					else {
						maxshiro = lenkuro;
					}

					if (lenkuro - maxkatie >= n)
						maxkatie += n;
					else {
						maxkatie = lenkuro;
					}
				}

				if (maxkuro == maxshiro || maxshiro == maxkatie)
					out.print("Draw");
				else {
					if (maxkuro > maxshiro) {
						if (maxkuro > maxkatie)
							out.println("Kuro");
					}
					if (maxshiro > maxkuro) {
						if (maxshiro > maxkatie)
							out.println("Shiro");
					}
					if (maxkatie > maxshiro) {
						if (maxkatie > maxkuro)
							out.println("Katie");
					}
				}

			}

		}

		private HashMap<Integer, Integer> intialize() {
			HashMap<Integer, Integer> map = new HashMap<>();

			int ch = 'a';
			int ch1 = 'A';
			for (int i = 0; i < 26; i++) {
				map.put(ch, 0);
				ch++;
			}
			for (int i = 0; i < 26; i++) {
				map.put(ch1, 0);
				ch1++;
			}

			return map;
		}
	}

	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.parseLong(next());
		}

	}
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.StringTokenizer;
import java.io.BufferedReader;
import java.util.Collections;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
import java.io.InputStream;

public class Main4 {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		XeniaAndBitOperations solver = new XeniaAndBitOperations();
		solver.solve(1, in, out);
		out.close();
	}

	static class XeniaAndBitOperations {

		public void solve(int testNumber, InputReader in, PrintWriter out) {
			long n = in.nextLong();

			String kuro = in.next();
			int lenkuro = kuro.length();
			HashMap<Integer, Integer> kuromap = intialize();
			String shiro = in.next();
			HashMap<Integer, Integer> shiromap = intialize();
			int lenshiro = shiro.length();
			String katie = in.next();
			HashMap<Integer, Integer> katiemap = intialize();
			int lenkatie = katie.length();

			if (n > 100000)
				out.print("Draw");
			else {

				// max repeating count character for each
				for (int i = 0; i < lenkuro; i++) {
					int ch = kuro.charAt(i);
					kuromap.put(ch, kuromap.get(ch) + 1);
				}

				for (int i = 0; i < lenshiro; i++) {
					int ch = shiro.charAt(i);
					shiromap.put(ch, shiromap.get(ch) + 1);
				}

				for (int i = 0; i < lenkatie; i++) {
					int ch = katie.charAt(i);
					katiemap.put(ch, katiemap.get(ch) + 1);
				}

				int maxkuro = 0;
				for (Map.Entry<Integer, Integer> entry : kuromap.entrySet()) {

					if (entry.getValue() > maxkuro)
						maxkuro = entry.getValue();
				}

				int maxshiro = 0;
				for (Map.Entry<Integer, Integer> entry : shiromap.entrySet()) {

					if (entry.getValue() > maxshiro)
						maxshiro = entry.getValue();
				}

				int maxkatie = 0;
				for (Map.Entry<Integer, Integer> entry : katiemap.entrySet()) {

					if (entry.getValue() > maxkatie)
						maxkatie = entry.getValue();
				}

				if (n == 1) {
					if (lenkuro == maxkuro)
						maxkuro--;
					else if (lenkuro > maxkuro)
						maxkuro++;
					if (lenkuro == maxshiro)
						maxshiro--;
					else if (lenkuro > maxshiro)
						maxshiro++;
					if (lenkuro == maxkatie)
						maxkatie--;
					else if (lenkuro > maxkatie)
						maxkatie++;

				} else {
					if (lenkuro - maxkuro >= n)
						maxkuro += n;
					else {
						maxkuro = lenkuro;
					}

					if (lenkuro - maxshiro >= n)
						maxshiro += n;
					else {
						maxshiro = lenkuro;
					}

					if (lenkuro - maxkatie >= n)
						maxkatie += n;
					else {
						maxkatie = lenkuro;
					}
				}

				int max = Math.max(Math.max(maxkuro, maxkatie), maxshiro);
				int count = 0;
				if (max == maxkuro)
					count++;
				if (max == maxshiro)
					count++;
				if (max == maxkatie)
					count++;

				if (count > 1)
					out.print("Draw");
				else {
					if (max == maxkuro)
						out.println("Kuro");
					if (max == maxshiro)
						out.println("Shiro");
					if (max == maxkatie)
						out.println("Katie");
				}
			}

		}

		private HashMap<Integer, Integer> intialize() {
			HashMap<Integer, Integer> map = new HashMap<>();

			int ch = 'a';
			int ch1 = 'A';
			for (int i = 0; i < 26; i++) {
				map.put(ch, 0);
				ch++;
			}
			for (int i = 0; i < 26; i++) {
				map.put(ch1, 0);
				ch1++;
			}

			return map;
		}
	}

	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.parseLong(next());
		}

	}
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.StringTokenizer;
import java.io.BufferedReader;
import java.util.Collections;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
import java.io.InputStream;

public class Main4 {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		XeniaAndBitOperations solver = new XeniaAndBitOperations();
		solver.solve(1, in, out);
		out.close();
	}

	static class XeniaAndBitOperations {

		public void solve(int testNumber, InputReader in, PrintWriter out) {
			long n = in.nextLong();

			String kuro = in.next();
			int lenkuro = kuro.length();
			HashMap<Integer, Integer> kuromap = intialize();
			String shiro = in.next();
			HashMap<Integer, Integer> shiromap = intialize();
			int lenshiro = shiro.length();
			String katie = in.next();
			HashMap<Integer, Integer> katiemap = intialize();
			int lenkatie = katie.length();

			if(n>100000)
				out.print("Draw");
			else{

				//max repeating count character for each
				for(int i=0; i<lenkuro; i++){
					int ch = kuro.charAt(i);
					kuromap.put(ch, kuromap.get(ch)+1);
				}

				for(int i=0; i<lenshiro; i++){
					int ch = shiro.charAt(i);
					shiromap.put(ch, shiromap.get(ch)+1);
				}

				for(int i=0; i<lenkatie; i++){
					int ch = katie.charAt(i);
					katiemap.put(ch, katiemap.get(ch)+1);
				}

				int maxkuro = 0;
				for(Map.Entry<Integer, Integer> entry:kuromap.entrySet()){

					if(entry.getValue() > maxkuro)
						maxkuro = entry.getValue();
				}

				int maxshiro = 0;
				for(Map.Entry<Integer, Integer> entry:shiromap.entrySet()){

					if(entry.getValue() > maxshiro)
						maxshiro = entry.getValue();
				}

				int maxkatie = 0;
				for(Map.Entry<Integer, Integer> entry:katiemap.entrySet()){

					if(entry.getValue() > maxkatie)
						maxkatie = entry.getValue();
				}

				if(lenkuro-maxkuro >=n)
					maxkuro += n;
				else{
					int temp = maxkuro;
					maxkuro = lenkuro;
					for(int i=0; i< n-(lenkuro-temp); i++){
						if(i%2==0)
							maxkuro--;
						else
							maxkuro++;
					}
				}

				if(lenkuro-maxshiro >=n)
					maxshiro += n;
				else{
					int temp = maxshiro;
					maxshiro = lenkuro;
					for(int i=0; i< n-(lenkuro-temp); i++){
						if(i%2==0)
							maxshiro--;
						else
							maxshiro++;
					}
				}

				if(lenkuro-maxkatie >=n)
					maxkatie += n;
				else{
					int temp = maxkatie;
					maxkatie = lenkuro;
					for(int i=0; i< n-(lenkuro-temp); i++){
						if(i%2==0)
							maxkatie--;
						else
							maxkatie++;
					}
				}

				if(maxkuro==maxshiro && maxshiro==maxkatie)
					out.print("Draw");
				else{
					if(maxkuro>maxshiro){
						if(maxkuro>maxkatie)
							out.println("Kuro");
					}
					if(maxshiro>maxkuro){
						if(maxshiro>maxkatie)
							out.println("Shiro");
					}
					if(maxkatie>maxshiro){
						if(maxkatie>maxkuro)
							out.println("Katie");
					}
				}

			}

		}

		private HashMap<Integer, Integer> intialize() {
			HashMap<Integer, Integer> map = new HashMap<>();

			int ch = 'a';
			int ch1 = 'A';
			for(int i=0; i<26; i++){
				map.put(ch, 0);
				ch++;
			}
			for(int i=0; i<26; i++){
				map.put(ch1, 0);
				ch1++;
			}

			return map;
		}
	}

	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.parseLong(next());
		}

	}
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.StringTokenizer;
import java.io.BufferedReader;
import java.util.Collections;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
import java.io.InputStream;

public class Main4 {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		XeniaAndBitOperations solver = new XeniaAndBitOperations();
		solver.solve(1, in, out);
		out.close();
	}

	static class XeniaAndBitOperations {

		public void solve(int testNumber, InputReader in, PrintWriter out) {
			long n = in.nextLong();

			String kuro = in.next();
			int lenkuro = kuro.length();
			HashMap<Integer, Integer> kuromap = intialize();
			String shiro = in.next();
			HashMap<Integer, Integer> shiromap = intialize();
			int lenshiro = shiro.length();
			String katie = in.next();
			HashMap<Integer, Integer> katiemap = intialize();
			int lenkatie = katie.length();

			if(n>100000)
				out.print("Draw");
			else{

				//max repeating count character for each
				for(int i=0; i<lenkuro; i++){
					int ch = kuro.charAt(i);
					kuromap.put(ch, kuromap.get(ch)+1);
				}

				for(int i=0; i<lenshiro; i++){
					int ch = shiro.charAt(i);
					shiromap.put(ch, shiromap.get(ch)+1);
				}

				for(int i=0; i<lenkatie; i++){
					int ch = katie.charAt(i);
					katiemap.put(ch, katiemap.get(ch)+1);
				}

				int maxkuro = 0;
				for(Map.Entry<Integer, Integer> entry:kuromap.entrySet()){

					if(entry.getValue() > maxkuro)
						maxkuro = entry.getValue();
				}

				int maxshiro = 0;
				for(Map.Entry<Integer, Integer> entry:shiromap.entrySet()){

					if(entry.getValue() > maxshiro)
						maxshiro = entry.getValue();
				}

				int maxkatie = 0;
				for(Map.Entry<Integer, Integer> entry:katiemap.entrySet()){

					if(entry.getValue() > maxkatie)
						maxkatie = entry.getValue();
				}

				if(lenkuro-maxkuro >=n)
					maxkuro += n;
				else{
					maxkuro = lenkuro;
				}

				if(lenkuro-maxshiro >=n)
					maxshiro += n;
				else{
					maxshiro = lenkuro;
				}

				if(lenkuro-maxkatie >=n)
					maxkatie += n;
				else{
					maxkatie = lenkuro;
				}

				if(maxkuro==maxshiro && maxshiro==maxkatie)
					out.print("Draw");
				else{
					if(maxkuro>maxshiro){
						if(maxkuro>maxkatie)
							out.println("Kuro");
					}
					if(maxshiro>maxkuro){
						if(maxshiro>maxkatie)
							out.println("Shiro");
					}
					if(maxkatie>maxshiro){
						if(maxkatie>maxkuro)
							out.println("Katie");
					}
				}

			}

		}

		private HashMap<Integer, Integer> intialize() {
			HashMap<Integer, Integer> map = new HashMap<>();

			int ch = 'a';
			int ch1 = 'A';
			for(int i=0; i<26; i++){
				map.put(ch, 0);
				ch++;
			}
			for(int i=0; i<26; i++){
				map.put(ch1, 0);
				ch1++;
			}

			return map;
		}
	}

	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.parseLong(next());
		}

	}
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.StringTokenizer;
import java.io.BufferedReader;
import java.util.Collections;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
import java.io.InputStream;

public class Main4 {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		XeniaAndBitOperations solver = new XeniaAndBitOperations();
		solver.solve(1, in, out);
		out.close();
	}

	static class XeniaAndBitOperations {

		public void solve(int testNumber, InputReader in, PrintWriter out) {
			long n = in.nextLong();

			String kuro = in.next();
			int lenkuro = kuro.length();
			HashMap<Integer, Integer> kuromap = intialize();
			String shiro = in.next();
			HashMap<Integer, Integer> shiromap = intialize();
			int lenshiro = shiro.length();
			String katie = in.next();
			HashMap<Integer, Integer> katiemap = intialize();
			int lenkatie = katie.length();

			if (n > 100000)
				out.print("Draw");
			else {

				// max repeating count character for each
				for (int i = 0; i < lenkuro; i++) {
					int ch = kuro.charAt(i);
					kuromap.put(ch, kuromap.get(ch) + 1);
				}

				for (int i = 0; i < lenshiro; i++) {
					int ch = shiro.charAt(i);
					shiromap.put(ch, shiromap.get(ch) + 1);
				}

				for (int i = 0; i < lenkatie; i++) {
					int ch = katie.charAt(i);
					katiemap.put(ch, katiemap.get(ch) + 1);
				}

				int maxkuro = 0;
				for (Map.Entry<Integer, Integer> entry : kuromap.entrySet()) {

					if (entry.getValue() > maxkuro)
						maxkuro = entry.getValue();
				}

				int maxshiro = 0;
				for (Map.Entry<Integer, Integer> entry : shiromap.entrySet()) {

					if (entry.getValue() > maxshiro)
						maxshiro = entry.getValue();
				}

				int maxkatie = 0;
				for (Map.Entry<Integer, Integer> entry : katiemap.entrySet()) {

					if (entry.getValue() > maxkatie)
						maxkatie = entry.getValue();
				}

				if (n == 1) {
					if(lenkuro == maxkuro)
						maxkuro--;
					else if(lenkuro > maxkuro)
						maxkuro++;
					if(lenkuro == maxshiro)
						maxshiro--;
					else if(lenkuro > maxshiro)
						maxshiro++;
					if(lenkuro == maxkatie)
						maxkatie--;
					else if(lenkuro > maxkatie)
						maxkatie++;

				} else {
					if (lenkuro - maxkuro >= n)
						maxkuro += n;
					else {
						maxkuro = lenkuro;
					}

					if (lenkuro - maxshiro >= n)
						maxshiro += n;
					else {
						maxshiro = lenkuro;
					}

					if (lenkuro - maxkatie >= n)
						maxkatie += n;
					else {
						maxkatie = lenkuro;
					}
				}

				if (maxkuro == maxshiro && maxshiro == maxkatie)
					out.print("Draw");
				else {
					if (maxkuro > maxshiro) {
						if (maxkuro > maxkatie)
							out.println("Kuro");
					}
					if (maxshiro > maxkuro) {
						if (maxshiro > maxkatie)
							out.println("Shiro");
					}
					if (maxkatie > maxshiro) {
						if (maxkatie > maxkuro)
							out.println("Katie");
					}
				}

			}

		}

		private HashMap<Integer, Integer> intialize() {
			HashMap<Integer, Integer> map = new HashMap<>();

			int ch = 'a';
			int ch1 = 'A';
			for (int i = 0; i < 26; i++) {
				map.put(ch, 0);
				ch++;
			}
			for (int i = 0; i < 26; i++) {
				map.put(ch1, 0);
				ch1++;
			}

			return map;
		}
	}

	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.parseLong(next());
		}

	}
}


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

public class Main {

    static InputReader in;
    static PrintWriter out;

    public static void main(String[] args) throws IOException{
        //InputStream ins = new FileInputStream("E:\\rush.txt");
        InputStream ins = System.in;
        in = new InputReader(ins);
        out = new PrintWriter(System.out);
        //code start from here
        new Task().solve(in, out);
        out.close();
    }

    static int N = 50000;
    static class Task{

        int n;
        String s[] = new String[3];
        int ma[] = new int[3];
        int cnt[][] = new int[3][500];
        int len;
        TreeMap dic = new TreeMap();

        public void solve(InputReader in,PrintWriter out) {
        	n = in.nextInt();
        	for (int i = 0;i < 3;i++) s[i] = in.next();
        	for (int i = 0;i < 3;i++) {
        		for (int j = 0;j < (int)s[i].length();j++) {
        			cnt[i][(int)s[i].charAt(j)]++;
        		}
        		for (int j = 'a';j <= 'z';j++)
        			ma[i] = Math.max(ma[i], cnt[i][j]);
        		for (int j = 'A';j <='Z';j++)
        			ma[i] = Math.max(ma[i], cnt[i][j]);
        		if (ma[i]==(int)s[i].length()) {
        			if (n==1) {
        				ma[i]--;
        			}
        		}else {
        			ma[i] = Math.min(ma[i]+n, s[i].length());
        		}
        	}
        	String s[] = {"Kuro","Shiro","Katie"};
    		if(ma[0]>ma[1]) {
    			int x = ma[0];ma[0] = ma[1];ma[1] = x;
    			String t = s[0];s[0] = s[1];s[1] = t;
    		}
    		if(ma[1]>ma[2]) {
    			int x = ma[1];ma[1] = ma[2];ma[2] = x;
    			String t = s[1];s[1] = s[2];s[2] = t;
    		}
    		if(ma[0]>ma[1]) {
    			int x = ma[0];ma[0] = ma[1];ma[1] = x;
    			String t = s[0];s[0] = s[1];s[1] = t;
    		}
    		if (ma[1]==ma[2]) {
    			out.println("Draw");
    		}else {
    			out.println(s[2]);
    		}
        }
    }

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

        public InputReader(InputStream ins) {
            br = new BufferedReader(new InputStreamReader(ins));
            tokenizer = null;
        }

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

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


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

public class Main {

    static InputReader in;
    static PrintWriter out;

    public static void main(String[] args) throws IOException{
        //InputStream ins = new FileInputStream("E:\\rush.txt");
        InputStream ins = System.in;
        in = new InputReader(ins);
        out = new PrintWriter(System.out);
        //code start from here
        new Task().solve(in, out);
        out.close();
    }

    static int N = 50000;
    static class Task{

        int n;
        String s[] = new String[3];
        int ma[] = new int[3];
        int cnt[][] = new int[3][500];
        int len;
        TreeMap dic = new TreeMap();

        public void solve(InputReader in,PrintWriter out) {
        	n = in.nextInt();
        	for (int i = 0;i < 3;i++) s[i] = in.next();
        	for (int i = 0;i < 3;i++) {
        		for (int j = 0;j < (int)s[i].length();j++) {
        			cnt[i][(int)s[i].charAt(j)]++;
        		}
        		for (int j = 'a';j <= 'z';j++)
        			ma[i] = Math.max(ma[i], cnt[i][j]);
        		for (int j = 'A';j <='Z';j++)
        			ma[i] = Math.max(ma[i], cnt[i][j]);
        		ma[i] = Math.min(ma[i]+n, s[i].length());
        	}
        	String s[] = {"Kuro","Shiro","Katie"};
    		if(ma[0]>ma[1]) {
    			int x = ma[0];ma[0] = ma[1];ma[1] = x;
    			String t = s[0];s[0] = s[1];s[1] = t;
    		}
    		if(ma[1]>ma[2]) {
    			int x = ma[1];ma[1] = ma[2];ma[2] = x;
    			String t = s[1];s[1] = s[2];s[2] = t;
    		}
    		if(ma[0]>ma[1]) {
    			int x = ma[0];ma[0] = ma[1];ma[1] = x;
    			String t = s[0];s[0] = s[1];s[1] = t;
    		}
    		if (ma[1]==ma[2]) {
    			out.println("Draw");
    		}else {
    			out.println(s[2]);
    		}
        }
    }

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

        public InputReader(InputStream ins) {
            br = new BufferedReader(new InputStreamReader(ins));
            tokenizer = null;
        }

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

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


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

public class Main {

    static InputReader in;
    static PrintWriter out;

    public static void main(String[] args) throws IOException{
        //InputStream ins = new FileInputStream("E:\\rush.txt");
        InputStream ins = System.in;
        in = new InputReader(ins);
        out = new PrintWriter(System.out);
        //code start from here
        new Task().solve(in, out);
        out.close();
    }

    static int N = 50000;
    static class Task{

        int n;
        String s[] = new String[3];
        int ma[] = new int[3];
        int cnt[][] = new int[3][500];
        int len;
        TreeMap dic = new TreeMap();

        public void solve(InputReader in,PrintWriter out) {
        	n = in.nextInt();
        	for (int i = 0;i < 3;i++) s[i] = in.next();
        	for (int i = 0;i < 3;i++) {
        		for (int j = 0;j < (int)s[i].length();j++) {
        			cnt[i][(int)s[i].charAt(j)]++;
        		}
        		for (int j = 'a';j <= 'z';j++)
        			ma[i] = Math.max(ma[i], cnt[i][j]);
        		for (int j = 'A';j <='Z';j++)
        			ma[i] = Math.max(ma[i], cnt[i][j]);
        		if (ma[i]==(int)s[i].length()) {
        			if (n%2==1) {
        				ma[i]--;
        			}
        		}else {
        			ma[i] = Math.min(ma[i]+n, s[i].length());
        		}
        	}
        	String s[] = {"Kuro","Shiro","Katie"};
    		if(ma[0]>ma[1]) {
    			int x = ma[0];ma[0] = ma[1];ma[1] = x;
    			String t = s[0];s[0] = s[1];s[1] = t;
    		}
    		if(ma[1]>ma[2]) {
    			int x = ma[1];ma[1] = ma[2];ma[2] = x;
    			String t = s[1];s[1] = s[2];s[2] = t;
    		}
    		if(ma[0]>ma[1]) {
    			int x = ma[0];ma[0] = ma[1];ma[1] = x;
    			String t = s[0];s[0] = s[1];s[1] = t;
    		}
    		if (ma[1]==ma[2]) {
    			out.println("Draw");
    		}else {
    			out.println(s[2]);
    		}
        }
    }

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

        public InputReader(InputStream ins) {
            br = new BufferedReader(new InputStreamReader(ins));
            tokenizer = null;
        }

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

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


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
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int n = in.nextInt();
            String Kuro = in.next();
            String Shiro = in.next();
            String Katie = in.next();
            int[] KuroCnt = new int[256];
            int[] ShiroCnt = new int[256];
            int[] KatieCnt = new int[256];
            for (int i = 0; i < Kuro.length(); i++) {
                KuroCnt[Kuro.charAt(i)]++;
                ShiroCnt[Shiro.charAt(i)]++;
                KatieCnt[Katie.charAt(i)]++;
            }
            int KuroMax = 0;
            int ShiroMax = 0;
            int KatieMax = 0;
            for (int i = 0; i < 256; i++) {
                KuroMax = Math.max(KuroMax, KuroCnt[i]);
                ShiroMax = Math.max(ShiroMax, ShiroCnt[i]);
                KatieMax = Math.max(KatieMax, KatieCnt[i]);
            }
            int KuroScore = Math.min(Kuro.length(), n + KuroMax);
            int ShiroScore = Math.min(Shiro.length(), n + ShiroMax);
            int KatieScore = Math.min(Katie.length(), n + KatieMax);
            int MaxScore = -1;
            int MaxQty = 0;
            String ans = "";
            if (KuroScore > MaxScore) {
                MaxScore = KuroScore;
                ans = "Kuro";
                MaxQty = 1;
            } else if (KuroScore == MaxScore) {
                MaxQty++;
            }
            if (ShiroScore > MaxScore) {
                MaxScore = ShiroScore;
                ans = "Shiro";
                MaxQty = 1;
            } else if (ShiroScore == MaxScore) {
                MaxQty++;
            }
            if (KatieScore > MaxScore) {
                MaxScore = KatieScore;
                ans = "Katie";
                MaxQty = 1;
            } else if (KatieScore == MaxScore) {
                MaxQty++;
            }
            if (MaxQty == 1) {
                out.println(ans);
            } else {
                out.println("Draw");
            }
        }

    }

    static class InputReader {
        private BufferedReader reader;
        private StringTokenizer stt;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream));
        }

        public String nextLine() {
            try {
                return reader.readLine();
            } catch (IOException e) {
                return null;
            }
        }

        public String next() {
            while (stt == null || !stt.hasMoreTokens()) {
                stt = new StringTokenizer(nextLine());
            }
            return stt.nextToken();
        }

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

    }
}


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
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int n = in.nextInt();
            String Kuro = in.next();
            String Shiro = in.next();
            String Katie = in.next();
            int[] KuroCnt = new int[256];
            int[] ShiroCnt = new int[256];
            int[] KatieCnt = new int[256];
            for (int i = 0; i < Kuro.length(); i++) {
                KuroCnt[Kuro.charAt(i)]++;
                ShiroCnt[Shiro.charAt(i)]++;
                KatieCnt[Katie.charAt(i)]++;
            }
            int KuroMax = 0;
            int ShiroMax = 0;
            int KatieMax = 0;
            for (int i = 0; i < 256; i++) {
                KuroMax = Math.max(KuroMax, KuroCnt[i]);
                ShiroMax = Math.max(ShiroMax, ShiroCnt[i]);
                KatieMax = Math.max(KatieMax, KatieCnt[i]);
            }
            int KuroScore = Math.min(Kuro.length(), n + KuroMax);
            if (n == 1 && KuroMax == Kuro.length()) {
                KuroScore = Kuro.length() - 1;
            }
            int ShiroScore = Math.min(Shiro.length(), n + ShiroMax);
            if (n == 1 && ShiroMax == Shiro.length()) {
                ShiroScore = Shiro.length() - 1;
            }
            int KatieScore = Math.min(Katie.length(), n + KatieMax);
            if (n == 1 && KatieMax == Katie.length()) {
                KatieScore = Katie.length() - 1;
            }
            int MaxScore = -1;
            int MaxQty = 0;
            String ans = "";
            if (KuroScore > MaxScore) {
                MaxScore = KuroScore;
                ans = "Kuro";
                MaxQty = 1;
            } else if (KuroScore == MaxScore) {
                MaxQty++;
            }
            if (ShiroScore > MaxScore) {
                MaxScore = ShiroScore;
                ans = "Shiro";
                MaxQty = 1;
            } else if (ShiroScore == MaxScore) {
                MaxQty++;
            }
            if (KatieScore > MaxScore) {
                MaxScore = KatieScore;
                ans = "Katie";
                MaxQty = 1;
            } else if (KatieScore == MaxScore) {
                MaxQty++;
            }
            if (MaxQty == 1) {
                out.println(ans);
            } else {
                out.println("Draw");
            }
        }

    }

    static class InputReader {
        private BufferedReader reader;
        private StringTokenizer stt;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream));
        }

        public String nextLine() {
            try {
                return reader.readLine();
            } catch (IOException e) {
                return null;
            }
        }

        public String next() {
            while (stt == null || !stt.hasMoreTokens()) {
                stt = new StringTokenizer(nextLine());
            }
            return stt.nextToken();
        }

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

    }
}


import java.util.*;

public class Solution {
    static class Score implements Comparable<Score> {
        public String name;
        public int score;

        public Score(String name, int score) {
            this.name = name;
            this.score = score;
        }

        @Override
        public int compareTo(Score arg0) {
            return arg0.score - this.score;
        }
    };

    private static int solve(int n, String s) {
        Integer[] c = new Integer[52];
        Arrays.fill(c, 0);

        for (int i = 0; i < s.length(); ++i) {
            char ch = s.charAt(i);
            if (Character.isLowerCase(ch))
                ++c[ch - 'a'];
            else
                ++c[ch - 'A'];
        }

        if (n == 1) {
            Arrays.sort(c, Collections.<Integer>reverseOrder());
            return c[0] + (c[1] == 0 ? -1 : 1);
        } else {
            int maxc = 0;
            for (int item : c)
                maxc = Math.max(maxc, item);

            return maxc + Math.min(n, s.length() - maxc);
        }
    }

    public static void main(String[] args) {
        try (Scanner input = new Scanner(System.in)) {
            int n = input.nextInt();

            Score[] result = new Score[3];
            result[0] = new Score("Kuro", 0);
            result[1] = new Score("Shiro", 0);
            result[2] = new Score("Katie", 0);

            for (int i = 0; i < 3; ++i) {
                String s = input.next();
                result[i].score = solve(n, s);
            }
            Arrays.sort(result);

            if (result[0].score == result[1].score)
                System.out.println("Draw");
            else
                System.out.println(result[0].name);
        }
    }
}


import java.util.*;

public class Solution {
    static class Score implements Comparable<Score> {
        public String name;
        public int score;

        public Score(String name, int score) {
            this.name = name;
            this.score = score;
        }

        @Override
        public int compareTo(Score arg0) {
            return arg0.score - this.score;
        }
    };

    private static int solve(int n, String s) {
        int[] c = new int[52];
        Arrays.fill(c, 0);

        for (int i = 0; i < s.length(); ++i) {
            char ch = s.charAt(i);
            if (Character.isLowerCase(ch))
                ++c[ch - 'a'];
            else
                ++c[ch - 'A'];
        }

        int maxc = 0;
        for (int item : c)
            maxc = Math.max(maxc, item);

        return maxc + Math.min(n, s.length() - maxc);
    }

    public static void main(String[] args) {
        try (Scanner input = new Scanner(System.in)) {
            int n = input.nextInt();

            Score[] result = new Score[3];
            result[0] = new Score("Kuro", 0);
            result[1] = new Score("Shiro", 1);
            result[2] = new Score("Katie", 2);

            for (int i = 0; i < 3; ++i) {
                String s = input.next();
                result[i].score = solve(n, s);
            }
            Arrays.sort(result);

            if (result[0].score == result[1].score)
                System.out.println("Draw");
            else
                System.out.println(result[0].name);
        }
    }
}


import java.util.*;

public class Solution {
    static class Score implements Comparable<Score> {
        public String name;
        public int score;

        public Score(String name, int score) {
            this.name = name;
            this.score = score;
        }

        @Override
        public int compareTo(Score arg0) {
            return arg0.score - this.score;
        }
    };

    private static int solve(int n, String s) {
        Integer[] c = new Integer[52];
        Arrays.fill(c, 0);

        for (int i = 0; i < s.length(); ++i) {
            char ch = s.charAt(i);
            if (Character.isLowerCase(ch))
                ++c[ch - 'a'];
            else
                ++c[ch - 'A'];
        }

        if (n == 1) {
            Arrays.sort(c, Collections.<Integer>reverseOrder());
            return c[0] + (c[1] == 0 ? -1 : 1);
        } else {
            int maxc = 0;
            for (int item : c)
                maxc = Math.max(maxc, item);

            return maxc + Math.min(n, s.length() - maxc);
        }
    }

    public static void main(String[] args) {
        try (Scanner input = new Scanner(System.in)) {
            int n = input.nextInt();

            Score[] result = new Score[3];
            result[0] = new Score("Kuro", 0);
            result[1] = new Score("Shiro", 1);
            result[2] = new Score("Katie", 2);

            for (int i = 0; i < 3; ++i) {
                String s = input.next();
                result[i].score = solve(n, s);
            }
            Arrays.sort(result);

            if (result[0].score == result[1].score)
                System.out.println("Draw");
            else
                System.out.println(result[0].name);
        }
    }
}


import java.util.*;

public class Solution {
    static class Score implements Comparable<Score> {
        public String name;
        public int score;

        public Score(String name, int score) {
            this.name = name;
            this.score = score;
        }

        @Override
        public int compareTo(Score arg0) {
            return arg0.score - this.score;
        }
    };

    private static int solve(int n, String s) {
        Integer[] c = new Integer[52];
        Arrays.fill(c, 0);

        for (int i = 0; i < s.length(); ++i) {
            char ch = s.charAt(i);
            if (Character.isLowerCase(ch))
                ++c[ch - 'a'];
            else
                ++c[ch - 'A' + 26];
        }

        if (n == 1) {
            Arrays.sort(c, Collections.<Integer>reverseOrder());
            return c[0] + (c[1] == 0 ? -1 : 1);
        } else {
            int maxc = 0;
            for (int item : c)
                maxc = Math.max(maxc, item);

            return maxc + Math.min(n, s.length() - maxc);
        }
    }

    public static void main(String[] args) {
        try (Scanner input = new Scanner(System.in)) {
            int n = input.nextInt();

            Score[] result = new Score[3];
            result[0] = new Score("Kuro", 0);
            result[1] = new Score("Shiro", 0);
            result[2] = new Score("Katie", 0);

            for (int i = 0; i < 3; ++i) {
                String s = input.next();
                result[i].score = solve(n, s);
            }
            Arrays.sort(result);

            if (result[0].score == result[1].score)
                System.out.println("Draw");
            else
                System.out.println(result[0].name);
        }
    }
}


import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;

public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter out = new BufferedWriter(new OutputStreamWriter(System.out));

        int N = Integer.parseInt(in.readLine());

        String kuro = in.readLine();
        String shiro = in.readLine();
        String katie = in.readLine();

        int maxb = Math.max(
                        maxBeauty(kuro, N),
                        Math.max(maxBeauty(shiro, N),
                        maxBeauty(katie, N)));

        int count = 0;
        String ans = "";
        if (maxb == maxBeauty(kuro, N)) {
            ++count;
            ans = "Kuro";
        }
        if (maxb == maxBeauty(shiro, N)) {
            ++count;
            ans = "Shiro";
        }
        if (maxb == maxBeauty(katie, N)) {
            ++count;
            ans = "Katie";
        }

        if (count >= 2) {
            ans = "Draw";
        }

        out.write(ans + "\n");

        in.close();
        out.close();
    }

    private static int maxBeauty(String s, int N) {
        int[] count = new int[300];
        int total = s.length();
        for (int i=0; i<total; ++i) {
            char ch = s.charAt(i);
            count[ch]++;
        }

        int maxCount = 0;
        for (int i=0; i<count.length; ++i) {
            if (count[i] > maxCount) {
                maxCount = count[i];
            }
        }
        if (N==1 && maxCount==total) {
            return maxCount-1;
        }
        return Math.min(maxCount + N, total);
    }
}


import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;

public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter out = new BufferedWriter(new OutputStreamWriter(System.out));

        int N = Integer.parseInt(in.readLine());

        String kuro = in.readLine();
        String shiro = in.readLine();
        String katie = in.readLine();

        int maxb = Math.max(
                        maxBeauty(kuro, N),
                        Math.max(maxBeauty(shiro, N),
                        maxBeauty(katie, N)));

        int count = 0;
        String ans = "";
        if (maxb == maxBeauty(kuro, N)) {
            ++count;
            ans = "Kuro";
        }
        if (maxb == maxBeauty(shiro, N)) {
            ++count;
            ans = "Shiro";
        }
        if (maxb == maxBeauty(katie, N)) {
            ++count;
            ans = "Katie";
        }

        if (count >= 2) {
            ans = "Draw";
        }

        out.write(ans + "\n");

        in.close();
        out.close();
    }

    private static int maxBeauty(String s, int N) {
        int[] count = new int[300];
        int total = s.length();
        for (int i=0; i<total; ++i) {
            char ch = s.charAt(i);
            count[ch]++;
        }

        int maxCount = 0;
        for (int i=0; i<count.length; ++i) {
            if (count[i] > maxCount) {
                maxCount = count[i];
            }
        }
        return Math.min(maxCount + N, total);
    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.BufferedWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.io.InputStream;

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

    static class TaskB {
        private int n;

        private int getMax(char[] a) {
            int MAX = 122;
            int length = a.length;
            int[] count = new int[MAX + 1];
            for (char c : a) count[c]++;
            int max = 0;
            for (int num : count) {
                if (num == 0) continue;
                if (num + n <= length) {
                    max = Math.max(max, num + n);
                } else {
                    int left = n - (length - num);
                    max = Math.max(max, length - (left & 1));
                }
            }
            return max;
        }

        public void solve(int testNumber, InputReader in, OutputWriter out) {
            n = in.nextInt();
            char[] kuro = in.nextString().toCharArray();
            char[] shiro = in.nextString().toCharArray();
            char[] katie = in.nextString().toCharArray();

            int maxKuro = getMax(kuro);
            int maxShiro = getMax(shiro);
            int maxKatie = getMax(katie);
            int min = Math.min(Math.min(maxKuro, maxShiro), maxKatie);
            int max = Math.max(Math.max(maxKuro, maxShiro), maxKatie);
            if (min == max) {
                out.print("Draw");
            } else if (max == maxKuro) {
                out.print("Kuro");
            } else if (max == maxShiro) {
                out.print("Shiro");
            } else {
                out.print("Katie");
            }
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public String nextString() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuilder res = new StringBuilder();
            do {
                if (Character.isValidCodePoint(c)) {
                    res.appendCodePoint(c);
                }
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void print(Object... objects) {
            for (int i = 0; i < objects.length; i++) {
                if (i != 0) {
                    writer.print(' ');
                }
                writer.print(objects[i]);
            }
        }

        public void close() {
            writer.close();
        }

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.BufferedWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.io.InputStream;

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

    static class TaskB {
        private int nMoves;

        private int getMax(char[] a) {
            int MAX = 122;
            int length = a.length;
            int[] count = new int[MAX + 1];
            for (char c : a) count[c]++;
            int max = 0;
            for (int num : count) {
                if (num == 0) continue;
                if (num + nMoves <= length) {
                    max = Math.max(max, num + nMoves);
                } else {
                    int left = nMoves - (length - num);
                    max = Math.max(max, length - (left == 1 ? 1 : 0));
                }
            }
            return max;
        }

        public void solve(int testNumber, InputReader in, OutputWriter out) {
            nMoves = in.nextInt();
            char[] kuro = in.nextString().toCharArray();
            char[] shiro = in.nextString().toCharArray();
            char[] katie = in.nextString().toCharArray();

            int maxKuro = getMax(kuro);
            int maxShiro = getMax(shiro);
            int maxKatie = getMax(katie);
            int max = Math.max(Math.max(maxKuro, maxShiro), maxKatie);
            int maxCount = (maxKuro == max ? 1 : 0) + (maxShiro == max ? 1 : 0) + (maxKatie == max ? 1 : 0);
            if (maxCount > 1) {
                out.print("Draw");
            } else if (max == maxKuro) {
                out.print("Kuro");
            } else if (max == maxShiro) {
                out.print("Shiro");
            } else {
                out.print("Katie");
            }
        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void print(Object... objects) {
            for (int i = 0; i < objects.length; i++) {
                if (i != 0) {
                    writer.print(' ');
                }
                writer.print(objects[i]);
            }
        }

        public void close() {
            writer.close();
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public String nextString() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuilder res = new StringBuilder();
            do {
                if (Character.isValidCodePoint(c)) {
                    res.appendCodePoint(c);
                }
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.BufferedWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.io.InputStream;

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

    static class TaskB {
        private int getMax(char[] a) {
            int MAX = 122;
            int[] count = new int[MAX + 1];
            for (char c : a) count[c]++;
            int max = 0;
            for (int num : count) max = Math.max(max, num);
            return max;
        }

        public void solve(int testNumber, InputReader in, OutputWriter out) {
            int nMoves = in.nextInt();
            char[] kuro = in.nextString().toCharArray();
            char[] shiro = in.nextString().toCharArray();
            char[] katie = in.nextString().toCharArray();

            int maxKuro = getMax(kuro);
            int maxShiro = getMax(shiro);
            int maxKatie = getMax(katie);
            int min = Math.min(Math.min(maxKuro, maxShiro), maxKatie);
            int max = Math.max(Math.max(maxKuro, maxShiro), maxKatie);
            if (min == max || min + nMoves >= kuro.length) {
                out.print("Draw");
            } else if (max == maxKuro) {
                out.print("Kuro");
            } else if (max == maxShiro) {
                out.print("Shiro");
            } else {
                out.print("Katie");
            }
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public String nextString() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuilder res = new StringBuilder();
            do {
                if (Character.isValidCodePoint(c)) {
                    res.appendCodePoint(c);
                }
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void print(Object... objects) {
            for (int i = 0; i < objects.length; i++) {
                if (i != 0) {
                    writer.print(' ');
                }
                writer.print(objects[i]);
            }
        }

        public void close() {
            writer.close();
        }

    }
}