#P421. 练72.2  n-1位数

练72.2  n-1位数

Description

Given an unsigned integer ww that is greater than 1010 but not exceeding 10000001000000, if ww is an nn-digit integer (n2n≥2), find the number formed by the last n1n−1 digits of ww.

Input Format

The first line contains MM, indicating the number of test cases.
The next MM lines each contain one test case.

Output Format

Output MM lines, each containing the corresponding n1n−1 digit number (ignoring leading zeros). If all digits except the highest digit are 00, output 00.

Sample

4
1023
5923
923
1000
23
923
23
0