{"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\u003ePolycarp is a beginner programmer. He is studying how to use a command line.\u003c/p\u003e\u003cp\u003ePolycarp faced the following problem. There are \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003en\u003c/i\u003e\u003c/span\u003e files in a directory and he needs to delete some of them. Polycarp wants to run a single delete command with filename pattern as an argument. All the files to be deleted should match the pattern and all other files shouldn\u0027t match the pattern.\u003c/p\u003e\u003cp\u003ePolycarp doesn\u0027t know about an asterisk \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003e*\u003c/span\u003e\u0027, the only special character he knows is a question mark \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003e?\u003c/span\u003e\u0027 which matches any single character. All other characters in the pattern match themselves only.\u003c/p\u003e\u003cp\u003eFormally, a pattern matches a filename if and only if they have equal lengths and all characters in the corresponding positions are equal except when the character in the pattern is \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003e?\u003c/span\u003e\u0027, in which case the corresponding filename character does not matter.\u003c/p\u003e\u003cp\u003eFor example, the filename pattern \"\u003cspan class\u003d\"tex-font-style-tt\"\u003ea?ba?\u003c/span\u003e\":\u003c/p\u003e\u003cul\u003e \u003cli\u003e matches filenames \"\u003cspan class\u003d\"tex-font-style-tt\"\u003eaabaa\u003c/span\u003e\", \"\u003cspan class\u003d\"tex-font-style-tt\"\u003eabba.\u003c/span\u003e\", \"\u003cspan class\u003d\"tex-font-style-tt\"\u003ea.ba9\u003c/span\u003e\" and \"\u003cspan class\u003d\"tex-font-style-tt\"\u003ea.ba.\u003c/span\u003e\"; \u003c/li\u003e\u003cli\u003e does not match filenames \"\u003cspan class\u003d\"tex-font-style-tt\"\u003eaaba\u003c/span\u003e\", \"\u003cspan class\u003d\"tex-font-style-tt\"\u003eabaab\u003c/span\u003e\", \"\u003cspan class\u003d\"tex-font-style-tt\"\u003eaabaaa\u003c/span\u003e\" and \"\u003cspan class\u003d\"tex-font-style-tt\"\u003eaabaa.\u003c/span\u003e\". \u003c/li\u003e\u003c/ul\u003e\u003cp\u003eHelp Polycarp find a pattern which matches files to be deleted and only them or report if there is no such pattern.\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003eThe first line of the input contains two integers \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003en\u003c/i\u003e\u003c/span\u003e and \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 ≤ \u003ci\u003en\u003c/i\u003e ≤ 100\u003c/span\u003e) — the total number of files and the number of files to be deleted.\u003c/p\u003e\u003cp\u003eThe following \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003en\u003c/i\u003e\u003c/span\u003e lines contain filenames, single filename per line. All filenames are non-empty strings containing only lowercase English letters, digits and dots (\u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003e.\u003c/span\u003e\u0027). The length of each filename doesn\u0027t exceed 100. It is guaranteed that all filenames are distinct.\u003c/p\u003e\u003cp\u003eThe last line of the input contains \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003em\u003c/i\u003e\u003c/span\u003e distinct integer numbers in ascending order \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003ea\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e1\u003c/sub\u003e, \u003ci\u003ea\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e2\u003c/sub\u003e, ..., \u003ci\u003ea\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e\u003ci\u003em\u003c/i\u003e\u003c/sub\u003e\u003c/span\u003e (\u003cspan class\u003d\"tex-span\"\u003e1 ≤ \u003ci\u003ea\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e\u003ci\u003ei\u003c/i\u003e\u003c/sub\u003e ≤ \u003ci\u003en\u003c/i\u003e\u003c/span\u003e) — indices of files to be deleted. All files are indexed from \u003cspan class\u003d\"tex-span\"\u003e1\u003c/span\u003e to \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003en\u003c/i\u003e\u003c/span\u003e in order of their appearance in the input.\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003eIf the required pattern exists, print \"\u003cspan class\u003d\"tex-font-style-tt\"\u003eYes\u003c/span\u003e\" in the first line of the output. The second line should contain the required pattern. If there are multiple solutions, print any of them.\u003c/p\u003e\u003cp\u003eIf the required pattern doesn\u0027t exist, print the only line containing \"\u003cspan class\u003d\"tex-font-style-tt\"\u003eNo\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 2\nab\nac\ncd\n1 2\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eYes\na?\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\u003e5 3\ntest\ntezt\ntest.\n.est\ntes.\n1 4 5\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eYes\n?es?\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\u003e4 4\na\nb\nc\ndd\n1 2 3 4\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eNo\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\u003e6 3\n.svn\n.git\n....\n...\n..\n.\n1 2 3\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eYes\n.???\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}