Palindromes with stacks

Use stacks to tell, for every given sequence of numbers, if the sequence is a palindrome or not. That is, you must tell if the sequence reads the same from left to right than from right to left (without reversing the digits of each number).

Input

Input consists of several sequences of numbers, one per line.

Output

For every line, print “It is a palindrome.” or “It is NOT palindrome.” as required.

Observation

To solve this exercise, the only containers that you should use are stacks of integer numbers.

Problem information

Author: Unknown
Translator: Carlos Molina

Generation: 2026-01-25T11:23:09.328Z

© Jutge.org, 2006–2026.
https://jutge.org