Tina Town is a friendly place. People there care about each other.
Tina has a ball called zball. Zball is magic. It grows larger every day. On the first day, it becomes 11 time as large as its original size. On the second day,it will become 22times as large as the size on the first day. On the n-th day,it will become nn times as large as the size on the (n-1)-th day. Tina want to know its size on the (n-1)-th day modulo n.
Input
The first line of input contains an integer TT, representing the number of cases.
The following TT lines, each line contains an integer nn, according to the description. T \leq {10}^{5},2 \leq n \leq {10}^{9}T≤105,2≤n≤109
Output
For each test case, output an integer representing the answer.
Sample Input
2
3
10
Sample Output
2
0
题意:
Tina Town 是一个善良友好的地方,这里的每一个人都互相关心。
Tina有一个球,它的名字叫zball。zball很神奇,它会每天变大。在第一天的时候,它会变大11倍。在第二天的时候,它会变大22倍。在第nn天的时候,它会变大nn倍。
zball原来的体积是11。Tina想知道,zball在第n-1n−1天时的体积对nn取模是多大呢?
Tina是一个蠢蠢的女孩子,当然不会算啦,所以她请你帮她算出这个答案呢。