{"trustable":false,"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":"PLAIN","content":"大魔法师XHK擅长对物体进行变换,变换的规则如下:\n若一个咒语以A开头B结尾,则可以把任何以A开头的物品变成以B开头的物品。\n现在XHK想养小仓鼠了,可是他没有小仓鼠(Mouse),只有一只皮球(Ball)。\nXHK掏出了他的大魔法书,上面记录了他所拥有的全部咒语,请问他能否拥有一只可爱的小仓鼠呢?"}},{"title":"Input","value":{"format":"PLAIN","content":"测试数据有多组。每组有多行,每行一个单词,仅包括小写字母,是XHK所会的所有咒语.数字0表示一组输入结束. "}},{"title":"Output","value":{"format":"PLAIN","content":"如果XHK可以将皮球变成仓鼠,就输出\"Yes.\",否则就输出\"No.\"(不要忽略了句号) \n"}},{"title":"Sample Input","value":{"format":"PLAIN","content":"so\nsoon\nriver\ngoes\nthem\ngot\nmoon\nbegin\nbig\n0"}},{"title":"Sample Output","value":{"format":"PLAIN","content":"Yes.\n\n\n \nXHK 可以念这个咒语:\"big-got-them\"."}}]}