{"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\u003eIn cryptography, a Caesar cipher, also known as the shift cipher, is one of the most straightforward and most widely known encryption techniques. It is a type of substitution cipher in which each letter in the plaintext is replaced by a letter some fixed number of positions up (or down) the alphabet.\u003c/p\u003e\u003cp\u003eFor example, with the right shift of $$$19$$$, \u003cspan class\u003d\"tex-font-style-tt\"\u003eA\u003c/span\u003e would be replaced by \u003cspan class\u003d\"tex-font-style-tt\"\u003eT\u003c/span\u003e, \u003cspan class\u003d\"tex-font-style-tt\"\u003eB\u003c/span\u003e would be replaced by \u003cspan class\u003d\"tex-font-style-tt\"\u003eU\u003c/span\u003e, and so on. A full exhaustive list is as follows: \u003c/p\u003e\u003cul\u003e \u003cli\u003e The plaintext: \u003cspan class\u003d\"tex-font-style-tt\"\u003eA B C D E F G H I J K L M N O P Q R S T U V W X Y Z\u003c/span\u003e; \u003c/li\u003e\u003cli\u003e The ciphertext: \u003cspan class\u003d\"tex-font-style-tt\"\u003eT U V W X Y Z A B C D E F G H I J K L M N O P Q R S\u003c/span\u003e. \u003c/li\u003e\u003c/ul\u003e\u003cp\u003eNow you have a plaintext and its ciphertext encrypted by a Caesar Cipher. You also have another ciphertext encrypted by the same method and are asked to decrypt it.\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003eThe input contains several test cases, and the first line is a positive integer $$$T$$$ indicating the number of test cases which is up to $$$50$$$.\u003c/p\u003e\u003cp\u003eFor each test case, the first line contains two integers $$$n$$$ and $$$m~(1 \\le n,m \\le 50)$$$ indicating the length of the first two texts (a plaintext and its ciphertext) and the length of the third text which will be given. Each of the second line and the third line contains a string only with capital letters of length $$$n$$$, indicating a given plaintext and its ciphertext respectively. The fourth line gives another ciphertext only with capital letters of length $$$m$$$.\u003c/p\u003e\u003cp\u003eWe guarantee that the pair of given plaintext (in the second line) and ciphertext (in the third line) is unambiguous with a certain Caesar Cipher.\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003eFor each test case, output a line containing \u003cspan class\u003d\"tex-font-style-tt\"\u003eCase #x: T\u003c/span\u003e, where \u003cspan class\u003d\"tex-font-style-tt\"\u003ex\u003c/span\u003e is the test case number starting from $$$1$$$, and \u003cspan class\u003d\"tex-font-style-tt\"\u003eT\u003c/span\u003e is the plaintext of the ciphertext given in the fourth line.\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\u003e1\n7 7\nACMICPC\nCEOKERE\nPKPIZKC\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eCase #1: NINGXIA\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}