{"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\n\u003cscript\u003e\n window.katexOptions \u003d {\n delimiters: [\n {left: \u0027$$$$$$\u0027, right: \u0027$$$$$$\u0027, display: true},\n {left: \u0027$$$\u0027, right: \u0027$$$\u0027, display: false},\n {left: \u0027$$\u0027, right: \u0027$$\u0027, display: true},\n {left: \u0027$\u0027, right: \u0027$\u0027, display: false}\n ]\n };\n\u003c/script\u003e\n","sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003eBob has a string of characters :- \"a\",\"b\",\"c\".\u003c/p\u003e\n\u003cp\u003e It is given that no two consecutive characters are the same. The string contains an unusually long subsequence that reads the same from both sides.\u003c/p\u003e\n\u003cp\u003eHelp Bob verify this by finding any one such subsequence that contains at least half of the characters of the original string ,(take floor of half of length). It is not necessary that the subsequence Bob founds should be of maximum length . Help Bob to find this subsequence.\u003c/p\u003e\n\u003cp\u003eA string $$$a$$$ is a subsequence of a string $$$b$$$ if $$$a$$$ can be obtained from $$$b$$$ by deletion of several (possibly, zero or all) characters.\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003eThe input consists of a single string $$$s$$$\u0026nbsp;($$$2 \\leq |s| \\leq 10^6$$$). The string $$$s$$$ consists only of characters \"\u003cspan class\u003d\"tex-font-style-tt\"\u003ea\u003c/span\u003e\", \"\u003cspan class\u003d\"tex-font-style-tt\"\u003eb\u003c/span\u003e\", \"\u003cspan class\u003d\"tex-font-style-tt\"\u003ec\u003c/span\u003e\". It is guaranteed that no two consecutive characters are equal.\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003eOutput a palindrome $$$t$$$ that is a subsequence of $$$s$$$ and $$$|t| \\geq \\lfloor \\frac{|s|}{2} \\rfloor$$$.\u003c/p\u003e\n\u003cp\u003eIf there are multiple solutions, you may print any of them. You don\u0027t have to maximise the length of $$$t$$$.\u003c/p\u003e\n\u003cp\u003eIf there are no solutions, output a string \"\u003cspan class\u003d\"tex-font-style-tt\"\u003eIMPOSSIBLE\u003c/span\u003e\" (quotes for clarity).\u003c/p\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\u003ecacbac\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eaba\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\u003eabc\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003ea\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Sample 3","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\u003ecbacacacbcbababacbcb\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003ecbaaacbcaaabc\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Note","value":{"format":"HTML","content":"\u003cp\u003eIn the first example, other valid answers include \"\u003cspan class\u003d\"tex-font-style-tt\"\u003ecacac\u003c/span\u003e\", \"\u003cspan class\u003d\"tex-font-style-tt\"\u003ecaac\u003c/span\u003e\", \"\u003cspan class\u003d\"tex-font-style-tt\"\u003eaca\u003c/span\u003e\" and \"\u003cspan class\u003d\"tex-font-style-tt\"\u003eccc\u003c/span\u003e\".\u003c/p\u003e"}}]}