Solve the mystery.  
Input:
String which consists of words(all the characters of any word are lower case letters) and punctuation marks(consists of {'.' , ',' , '?' , '!'}). Also every input string consists of one '*' in it.
It is guaranteed that strings doesn't start or end with space(' ') and only one answer exists for each case.  

Output:
Lower case letter.  

Constrains:
1 ≤ t ≤ 1000
2 ≤ length of string(n) ≤ 100  

Problem Setter : Vinay Kumar

SAMPLE INPUT
7
k! cats s*ack.
ah, s*tan sees natasha!
aibohphobi*
al lets della call ed ste*la.
amy, must i jujitsu *y ma?
aerata pat a*ea.
lollipop i * lol.

SAMPLE OUTPUT
t
a
a
l
m
r
l
t=input()
for i in range(0,t):
  s=raw_input()
  s2=""
  wd=""
  tmp1=""
  tmp2=""
  for j in range(0,len(s)):
    if s[j]!=',' and s[j]!='?' and s[j]!='.' and s[j]!='!' and s[j]!=' ':
      s2=s2+s[j]
  for j in range(0,len(s2)/2+1):
    wd=wd+s2[j]
  k=0
  for j in range(len(s2)-1,len(s2)/2-1,-1):
    if s2[j]!=wd[k]:
      tmp1=s2[j]
      tmp2=wd[k]
      break
    else:
      k+=1
  if tmp1=='*':
    print(tmp2)
  else:
    print(tmp1)