Palindromes P56659


Statement
 

pdf   zip

Palindromes

Given a sequence of words, say which of them are palindromes and wich are not. Remember that a word is a palindrome if is read equal from left to right and from right to left.

Input

The first line of the input contains a number nn. The nn following lines contain each one a non empty word formed exclusively by uppercase letters.

Output

For each word, your program must print in a line if is a palindrome following the format of the instance.

Author

Salvador Roura (en: Carlos Molina)

© Jutge.org, 2006–2025.

Public test cases
  • Input

    2
    CASA
    POP
    

    Output

    CASA no es palindrom
    POP es palindrom
    
  • Information
    Author
    Salvador Roura
    Language
    English
    Translator
    Carlos Molina
    Original language
    Catalan
    Other languages
    Catalan
    Official solutions
    C++
    User solutions
    C++ Haskell Python