CodeLab Academy 📞 9936 6696
← List Python · Level 10: Algorithms Code · 100 points ← #963 #965 →

#964. Longest palindromic substring

You get a string. Print its longest palindromic substring (if there is a tie, the leftmost one). ### Input One line. ### Output One line.

Examples

Input
bbaca
Output
aca
Input
bcbbc
Output
cbbc

💡 You can solve it with Python, JavaScript or blocks. Read the input line by line with input(). Don't print a question (like input("Number: ")). Print exactly what the output asks for, nothing more.

🔒 You can solve the first 3 problems without an account. Sign up for free to solve this one!