{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cbr\u003eYou are given \u003ci\u003eN\u003c/i\u003e words. Find the shortest palindrome (a word that is the same with its reverse) containing all of them as contiguous substrings. \u003cbr\u003e\u003cdiv align\u003d\"left\" style\u003d\"margin-top: 1.0em;\"\u003e\u003cb\u003eInput\u003c/b\u003e\u003c/div\u003eThe first line of input contains an integer \u003ci\u003eN\u003c/i\u003e, 1 ≤ \u003ci\u003eN\u003c/i\u003e ≤ 14. The next \u003ci\u003eN\u003c/i\u003e lines contain one word each, between 1 and 30 characters long. All the characters are small English letters (\u0027\u003cpre style\u003d\"display: inline;font-size: 120.0%;\"\u003ea\u003c/pre\u003e\u0027 through \u0027\u003cpre style\u003d\"display: inline;font-size: 120.0%;\"\u003ez\u003c/pre\u003e\u0027).\u003cbr\u003e\u003cdiv align\u003d\"left\" style\u003d\"margin-top: 1.0em;\"\u003e\u003cb\u003eOutput\u003c/b\u003e\u003c/div\u003eOutput the required palindrome. If there\u0027re several possible solutions, output any.\u003cbr\u003e"}},{"title":"Sample 1","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\navtobus\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eavtobusubotva\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Sample 2","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\nbacd\nedcab\ncabac\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eedcabacde\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}