{"trustable":true,"prependHtml":"\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 async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\" type\u003d\"text/javascript\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv class\u003d\"panel_content\"\u003eSteam is a digital distribution platform developed by Valve Corporation offering digital rights management (DRM), multiplayer gaming and social networking services. A family view can help you to prevent your children access to some content which are not suitable for them. \u003cbr\u003e\u003cbr\u003eTake an MMORPG game as an example, given a sentence T, and a list of forbidden words {P}, your job is to use \u0027*\u0027 to subsititute all the characters, which is a part of the substring matched with at least one forbidden word in the list (case-insensitive).\u003cbr\u003e\u003cbr\u003eFor example, T is: \"I love Beijing\u0027s Tiananmen, the sun rises over Tiananmen. Our great leader Chairman Mao, he leades us marching on.\"\u003cbr\u003e\u003cbr\u003eAnd {P} is: {\"tiananmen\", \"eat\"}\u003cbr\u003e\u003cbr\u003eThe result should be: \"I love Beijing\u0027s *********, the sun rises over *********. Our gr*** leader Chairman Mao, he leades us marching on.\"\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cb\u003eThe first line contains the number of test cases. For each test case:\u003c/b\u003e\u003cbr\u003eThe first line contains an integer $n$, represneting the size of the forbidden words list $P$. Each line of the next $n$ lines contains a forbidden words $P_i~(1\\le |P_i|\\le 1000000, \\sum |P_i| \\le 1000000)$ where $P_i$ only contains lowercase letters.\u003cbr\u003e\u003cbr\u003eThe last line contains a string $T~(|T| \\le 1000000)$."}},{"title":"Output","value":{"format":"HTML","content":"For each case output the sentence in a line."}},{"title":"Sample","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\r\n3\r\ntrump\r\nri\r\no\r\nDonald John Trump (born June 14, 1946) is an American businessman, television personality, author, politician, and the Republican Party nominee for President of the United States in the 2016 election. He is chairman of The Trump Organization, which is the principal holding company for his real estate ventures and other business interests.\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eD*nald J*hn ***** (b*rn June 14, 1946) is an Ame**can businessman, televisi*n pers*nality, auth*r, p*litician, and the Republican Party n*minee f*r President *f the United States in the 2016 electi*n. He is chairman *f The ***** *rganizati*n, which is the p**ncipal h*lding c*mpany f*r his real estate ventures and *ther business interests.\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}