Please check the password! @ Dcoder

in #programminglast year

Problem: Ethan has a possible list of password to hack a secure account. To select the correct password, he researched the owner and discovered that the account's owner is very fond of acronyms. After eliminating the rest of the patterns, Ethan is now sure that the password and its reverse, both, are present in the list. You need to find the password among that list and print its length along with its middlemost character.
NOTE: All strings in the list are of odd length.
Input: First line contains N, the number of elements in the list.
The next N lines each contain a single word.
Output: Print the length of the password and its middlemost character separated by a string.
Constraints: 1 ≤ N ≤ 50
1 ≤ string.length ≤ 20
Sample Input: 4
xyz
dco
der
zyx
Sample Output:
3 y

lst = []
for t in range(int(input())):
  lst.append(input())
for password in lst:
  if password[::-1] in lst:
    print(len(password), password[len(password)//2])
    break