You are given a string of length . Each character of is either an uppercase English letter or a period ..
Construct a string by replacing every period in with an uppercase English letter. Characters that are already uppercase letters cannot be changed.
For every integer (), the prefix must be a palindrome. A palindrome reads the same from left to right and from right to left.
Find the number of distinct strings satisfying the condition.
The input is given from Standard Input in the following format:
For each test case, print the number of distinct strings satisfying the condition on one line.
Each case is given in the following format:
. ().