It has been a while since there was a problem about palindromes, so let us fix that. You are given a string . Find its lexicographically smallest substring of length that is a palindrome.
Recall that a string is lexicographically smaller than a string of the same length if there exists an index (1 \leq i \leq |a|) such that: a_1 = b_1, a_2 = b_2, , a_{i-1} = b_{i-1}, and a_i < b_i. A palindrome is a string that reads the same from left to right and from right to left.
The first line contains (1 \leq L \leq |s|) — the length of the required substring. The second line contains (1 \leq |s| \leq 100500), consisting of lowercase Latin letters.
Output the lexicographically smallest substring of that has length and is a palindrome. If no such substring exists, output 42.
Example
3
abacabaabaExample
2
abcdef42Example 1