Is It a Number?

No attempts yetTime limit1sMemory limit256 MB

Problem

Your first task at a new job is input validation. You have to check whether a typed line describes an integer.

Given one line of characters, decide whether it describes a single non-negative integer. Spaces are allowed before and after the number, and the rest of the line must consist of digits only. Only the characters 0 to 9 count as digits, and a sign such as + or - is not accepted. Every character in the input has an ASCII value between 32 and 126, so the only whitespace character that can appear is the space.

Input

The first line contains TT, the number of lines to validate. Each of the next TT lines holds one line to validate.

  • 0<T5000 < T \le 500
  • Each line has at least 1 and at most 50 characters, not counting the line break.
  • Each line consists of characters whose ASCII value is between 32 and 126, inclusive.

Output

For each line, print one line. Print the value of the number if the line describes a valid integer, or print invalid input in all lowercase if it does not. Print the value without leading zeros, so 0045 prints as 45.