eolymp
bolt
Try our new interface for solving problems
Problems

Antipalindrome

Antipalindrome

\textit{A palindrome} is a string that reads the same on both sides. The string $s$ is given. Find its longest substring that is not a palindrome. \InputFile The input file contains the string $s$. It consists only of lowercase letters of the Latin alphabet, is not empty, and its length does not exceed $100 000$ characters. \OutputFile Output the answer to the problem into the output file; if there are several answers, choose the lexicographically minimal one. If all substrings of $s$ are palindromes, output \texttt{NO SOLUTION}.
Time limit 1 second
Memory limit 64 MiB
Input example #1
abba
Output example #1
abb