#nt802. 原根
原根
Primitive Root
Problem Description
Answer queries; each query gives a prime , and you must output its smallest primitive root .
Input Format
The first line contains an integer . The following lines each contain one integer .
Output Format
Output one integer: the smallest primitive root.
Sample Input
3
2
178187
998244353
Sample Output
1
2
3
Constraints
For all data, , , and is prime.