#K64337. Taco Palindrome Transformation

    ID: 31953 Type: Default 1000ms 256MiB

Taco Palindrome Transformation

Taco Palindrome Transformation

Problem Statement: You are given a string s consisting of lowercase letters and the character ''. A string is called a palindrome if it reads the same forwards and backwards. Your task is to determine whether it is possible to replace each occurrence of '' with any lowercase letter (each '*' may be replaced with a different letter) such that the resulting string becomes a palindrome.

Mathematically, a string s of length n is a palindrome if and only if ( s[i] = s[n-1-i] ) for all ( 0 \leq i < n ).

For example, if s = "abba", by replacing '' with 'b', the string becomes "abbba" which is a palindrome, so the answer is True.

Note: Input and output are handled via standard input and standard output respectively.

inputFormat

The input consists of a single line containing the string s. The string s may include lowercase letters and '*' characters.

outputFormat

Output a single line: 'True' if it is possible to replace '*' characters to form a palindrome, otherwise 'False'.## sample

ab*ba
True