
A palindrome is a number that reads the same from left to right and from right to left.
For example:
are palindromes, while:
are not.
You are given a positive integer N.
If N is not a palindrome, reverse its digits and add the reversed number to the original number.
Then repeat the same process with the new number until a palindrome is reached.
For example, starting with 195:
Since 9339 is a palindrome, the process stops.
Your task is to determine how many additions are needed to reach a palindrome and what the final palindrome is.
If the steps needed are more than 100, print Not found. instead
One positive integer:
N
where:
1 ≤ N ≤ 100000
Print two integers separated by a space:
steps palindrome
where:
steps is the number of reverse-and-add operations performed.
palindrome is the final palindrome reached.
If N is already a palindrome, steps is 0.
If the steps are more than 100, print Not found. instead