Given two four-digit numbers A and B. Output all four-digit numbers on the segment from A to B, the record of which is a palindrome. Input: Enter two integers A and B Output: Output the answer to the problem.

1000 ms 256 Mb Rules for program design and list of errors in automatic problem checking