P7672 [COCI 2013/2014 #5] LOZINKA

Description

You are given some strings of odd length. Please find a string such that its reversed string is also among the given strings. For example, for the string `abcca`, if it satisfies the requirement, then the string `accba` must also appear in the input strings. Output the length of this string and the character in its exact middle position.

Input Format

The input contains a total of $n+1$ lines: Line $1$ contains an integer $n$, representing the number of given strings. Lines $2$ to $n+1$ each contain one string.

Output Format

Output a total of $1$ line: an integer and a character, separated by a space, representing the length of a valid string and the character in the middle of the string.

Explanation/Hint

**[Sample Explanation #1]** `las` and `sal` form a valid pair. The length is $3$, and the middle character is `a`. **[Sample Explanation #2]** `kisik` is a palindrome. Its reversed string is still `kisik`, so it satisfies the requirement. **[Constraints]** For $100\%$ of the testdata, $1 \le n \le 100$, $3 \le$ string length $\le 13$. All strings consist of lowercase letters. It is guaranteed that the answer is unique. **[Notes]** The score of this problem follows the original COCI setting. The full score is $50$. This problem is translated from [COCI2013_2014](https://hsin.hr/coci/archive/2013_2014/) [CONTEST #5](https://hsin.hr/coci/archive/2013_2014/contest5_tasks.pdf) _**T1 LOZINKA**_. Translated by ChatGPT 5