{"trustable":false,"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":"\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027]], displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027]]}\n });\n \u003c/script\u003e\n \u003cscript type\u003d\"text/javascript\" async\n src\u003d\"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\"\u003e\n \u003c/script\u003e\n\u003cp\u003eAfter observing the results of Spy Syndrome, Yash realised the errors of his ways. He now believes that a super spy such as Siddhant can\u0027t use a cipher as basic and ancient as Caesar cipher. After many weeks of observation of Siddhant’s sentences, Yash determined a new cipher technique.\u003c/p\u003e\n\u003cp\u003eFor a given sentence, the cipher is processed as: \u003c/p\u003e\n\u003col\u003e \n \u003cli\u003e Convert all letters of the sentence to lowercase. \u003c/li\u003e\n \u003cli\u003e Reverse each of the words of the sentence individually. \u003c/li\u003e\n \u003cli\u003e Remove all the spaces in the sentence. \u003c/li\u003e\n\u003c/ol\u003e\n\u003cp\u003eFor example, when this cipher is applied to the sentence\u003c/p\u003e\n\u003cp\u003e\u003cspan class\u003d\"tex-font-style-tt\"\u003eKira is childish and he hates losing\u003c/span\u003e\u003c/p\u003e\n\u003cp\u003ethe resulting string is\u003c/p\u003e\n\u003cp\u003e\u003cspan class\u003d\"tex-font-style-tt\"\u003eariksihsidlihcdnaehsetahgnisol\u003c/span\u003e\u003c/p\u003e\n\u003cp\u003eNow Yash is given some ciphered string and a list of words. Help him to find out any original sentence composed using only words from the list. Note, that any of the given words could be used in the sentence multiple times.\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003eThe first line of the input contains a single integer \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003en\u003c/i\u003e\u003c/span\u003e (\u003cspan class\u003d\"tex-span\"\u003e1 ≤ \u003ci\u003en\u003c/i\u003e ≤ 10 000\u003c/span\u003e)\u0026nbsp;— the length of the ciphered text. The second line consists of \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003en\u003c/i\u003e\u003c/span\u003e lowercase English letters\u0026nbsp;— the ciphered text \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003et\u003c/i\u003e\u003c/span\u003e.\u003c/p\u003e\n\u003cp\u003eThe third line contains a single integer \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003em\u003c/i\u003e\u003c/span\u003e (\u003cspan class\u003d\"tex-span\"\u003e1 ≤ \u003ci\u003em\u003c/i\u003e ≤ 100 000\u003c/span\u003e)\u0026nbsp;— the number of words which will be considered while deciphering the text. Each of the next \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003em\u003c/i\u003e\u003c/span\u003e lines contains a non-empty word \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003ew\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e\u003ci\u003ei\u003c/i\u003e\u003c/sub\u003e\u003c/span\u003e (\u003cspan class\u003d\"tex-span\"\u003e|\u003ci\u003ew\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e\u003ci\u003ei\u003c/i\u003e\u003c/sub\u003e| ≤ 1 000\u003c/span\u003e) consisting of uppercase and lowercase English letters only. It\u0027s guaranteed that the total length of all words doesn\u0027t exceed \u003cspan class\u003d\"tex-span\"\u003e1 000 000\u003c/span\u003e.\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003ePrint one line — the original sentence. It is guaranteed that at least one solution exists. If there are multiple solutions, you may output any of those.\u003c/p\u003e"}},{"title":"Examples","value":{"format":"HTML","content":"\u003cdiv class\u003d\"sample-test\"\u003e\n \u003cdiv class\u003d\"input\"\u003e\n \u003cdiv class\u003d\"title\"\u003e\n Input\n \u003c/div\u003e\n \u003cpre\u003e30\u003cbr\u003eariksihsidlihcdnaehsetahgnisol\u003cbr\u003e10\u003cbr\u003eKira\u003cbr\u003ehates\u003cbr\u003eis\u003cbr\u003ehe\u003cbr\u003elosing\u003cbr\u003edeath\u003cbr\u003echildish\u003cbr\u003eL\u003cbr\u003eand\u003cbr\u003eNote\u003cbr\u003e\u003c/pre\u003e\n \u003c/div\u003e\n \u003cdiv class\u003d\"output\"\u003e\n \u003cdiv class\u003d\"title\"\u003e\n Output\n \u003c/div\u003e\n \u003cpre\u003eKira is childish and he hates losing \u003cbr\u003e\u003c/pre\u003e\n \u003c/div\u003e\n \u003cdiv class\u003d\"input\"\u003e\n \u003cdiv class\u003d\"title\"\u003e\n Input\n \u003c/div\u003e\n \u003cpre\u003e12\u003cbr\u003eiherehtolleh\u003cbr\u003e5\u003cbr\u003eHI\u003cbr\u003eHo\u003cbr\u003ethere\u003cbr\u003eHeLLo\u003cbr\u003ehello\u003cbr\u003e\u003c/pre\u003e\n \u003c/div\u003e\n \u003cdiv class\u003d\"output\"\u003e\n \u003cdiv class\u003d\"title\"\u003e\n Output\n \u003c/div\u003e\n \u003cpre\u003eHI there HeLLo \u003cbr\u003e\u003c/pre\u003e\n \u003c/div\u003e\n\u003c/div\u003e"}},{"title":"Note","value":{"format":"HTML","content":"\u003cp\u003eIn sample case 2 there may be multiple accepted outputs, \"HI there HeLLo\" and \"HI there hello\" you may output any of them. \u003c/p\u003e"}}]}