2254.s-palindrome

Time Limit: 1s Memory Limit: 256MB

Let's call a string "s-palindrome" if it is symmetric about the middle of the string. For example, the string "oHo" is "s-palindrome", but the string "aa" is not. The string "aa" is not "s-palindrome", because the second half of it is not a mirror reflection of the first half.
2254_1.png English alphabet
You are given a string s. Check if the string is "s-palindrome".

Input Format(From the terminal/stdin)

The only line contains the string s (1 \le |s| \le 1000) which consists of only English letters.

Output Format(To the terminal/stdout)

Print "TAK" if the string s is "s-palindrome" and "NIE" otherwise.

Sample Input 1

Copy
oXoxoXo
       \n

Sample Output 1

Copy
TAK
   \n

Sample Input 2

Copy
bod
   \n

Sample Output 2

Copy
TAK
   \n

Sample Input 3

Copy
ER
  \n

Sample Output 3

Copy
NIE
   \n

Submit

请先 登录

© 2025 FAQs