{"trustable":true,"prependHtml":"\u003cstyle type\u003d\u0027text/css\u0027\u003e\n .input, .output {\n border: 1px solid #888888;\n }\n .output {\n margin-bottom: 1em;\n position: relative;\n top: -1px;\n }\n .output pre, .input pre {\n background-color: #EFEFEF;\n line-height: 1.25em;\n margin: 0;\n padding: 0.25em;\n }\n \u003c/style\u003e\n \u003clink rel\u003d\"stylesheet\" href\u003d\"//codeforces.org/s/96598/css/problem-statement.css\" type\u003d\"text/css\" /\u003e\u003cscript\u003e window.katexOptions \u003d { disable: true }; \u003c/script\u003e\n\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {\n inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]],\n displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]\n }\n });\n\u003c/script\u003e\n\u003cscript type\u003d\"text/javascript\" async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS_HTML-full\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003eAfter the big birthday party, Katie still wanted Shiro to have some more fun. Later, she came up with a game called \u003cspan class\u003d\"tex-font-style-it\"\u003etreasure hunt\u003c/span\u003e. Of course, she invited her best friends Kuro and Shiro to play with her.\u003c/p\u003e\u003cp\u003eThe three friends are very smart so they passed all the challenges very quickly and finally reached the destination. But the treasure can only belong to one cat so they started to think of something which can determine who is worthy of the treasure. Instantly, Kuro came up with some ribbons.\u003c/p\u003e\u003cp\u003eA random colorful ribbon is given to each of the cats. Each color of the ribbon can be represented as an uppercase or lowercase Latin letter. Let\u0027s call a consecutive subsequence of colors that appears in the ribbon a \u003cspan class\u003d\"tex-font-style-it\"\u003esubribbon\u003c/span\u003e. The \u003cspan class\u003d\"tex-font-style-it\"\u003ebeauty\u003c/span\u003e of a ribbon is defined as the maximum number of times one of its subribbon appears in the ribbon. The more the subribbon appears, the more beautiful is the ribbon. For example, the ribbon \u003cspan class\u003d\"tex-font-style-tt\"\u003eaaaaaaa\u003c/span\u003e has the beauty of $$$7$$$ because its subribbon \u003cspan class\u003d\"tex-font-style-tt\"\u003ea\u003c/span\u003e appears $$$7$$$ times, and the ribbon \u003cspan class\u003d\"tex-font-style-tt\"\u003eabcdabc\u003c/span\u003e has the beauty of $$$2$$$ because its subribbon \u003cspan class\u003d\"tex-font-style-tt\"\u003eabc\u003c/span\u003e appears twice.\u003c/p\u003e\u003cp\u003eThe rules are simple. The game will have $$$n$$$ turns. Every turn, each of the cats must change strictly \u003cspan class\u003d\"tex-font-style-bf\"\u003eone\u003c/span\u003e color (at one position) in his/her ribbon to an arbitrary color which is \u003cspan class\u003d\"tex-font-style-bf\"\u003edifferent\u003c/span\u003e from the unchanged one. For example, a ribbon \u003cspan class\u003d\"tex-font-style-tt\"\u003eaaab\u003c/span\u003e can be changed into \u003cspan class\u003d\"tex-font-style-tt\"\u003eacab\u003c/span\u003e in one turn. The one having the most beautiful ribbon after $$$n$$$ turns wins the treasure.\u003c/p\u003e\u003cp\u003eCould you find out who is going to be the winner if they all play optimally?\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003eThe first line contains an integer $$$n$$$ ($$$0 \\leq n \\leq 10^{9}$$$)\u0026nbsp;— the number of turns.\u003c/p\u003e\u003cp\u003eNext 3 lines contain 3 ribbons of Kuro, Shiro and Katie one per line, respectively. Each ribbon is a string which contains no more than $$$10^{5}$$$ uppercase and lowercase Latin letters and is not empty. It is guaranteed that the length of all ribbons are equal for the purpose of fairness. Note that uppercase and lowercase letters are considered different colors.\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003ePrint the name of the winner (\"\u003cspan class\u003d\"tex-font-style-tt\"\u003eKuro\u003c/span\u003e\", \"\u003cspan class\u003d\"tex-font-style-tt\"\u003eShiro\u003c/span\u003e\" or \"\u003cspan class\u003d\"tex-font-style-tt\"\u003eKatie\u003c/span\u003e\"). If there are at least two cats that share the maximum beauty, print \"\u003cspan class\u003d\"tex-font-style-tt\"\u003eDraw\u003c/span\u003e\".\u003c/p\u003e"}},{"title":"Examples","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e3\nKuroo\nShiro\nKatie\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eKuro\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e7\ntreasurehunt\nthreefriends\nhiCodeforces\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eShiro\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e1\nabcabc\ncbabac\nababca\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eKatie\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e15\nfoPaErcvJ\nmZaxowpbt\nmkuOlaHRE\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eDraw\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Note","value":{"format":"HTML","content":"\u003cp\u003eIn the first example, after $$$3$$$ turns, Kuro can change his ribbon into \u003cspan class\u003d\"tex-font-style-tt\"\u003eooooo\u003c/span\u003e, which has the beauty of $$$5$$$, while reaching such beauty for Shiro and Katie is impossible (both Shiro and Katie can reach the beauty of at most $$$4$$$, for example by changing Shiro\u0027s ribbon into \u003cspan class\u003d\"tex-font-style-tt\"\u003eSSiSS\u003c/span\u003e and changing Katie\u0027s ribbon into \u003cspan class\u003d\"tex-font-style-tt\"\u003eKaaaa\u003c/span\u003e). Therefore, the winner is Kuro.\u003c/p\u003e\u003cp\u003eIn the fourth example, since the length of each of the string is $$$9$$$ and the number of turn is $$$15$$$, everyone can change their ribbons in some way to reach the maximal beauty of $$$9$$$ by changing their strings into \u003cspan class\u003d\"tex-font-style-tt\"\u003ezzzzzzzzz\u003c/span\u003e after 9 turns, and repeatedly change their strings into \u003cspan class\u003d\"tex-font-style-tt\"\u003eazzzzzzzz\u003c/span\u003e and then into \u003cspan class\u003d\"tex-font-style-tt\"\u003ezzzzzzzzz\u003c/span\u003e thrice. Therefore, the game ends in a draw.\u003c/p\u003e"}}]}