You are given a prime p . For a number a , you need to find positive integers x1,x2,…,xk such that ∏xi≡a(modp) , and ∑xi≤2500 . Output any valid solution.
输入格式
The first line contains a prime p(1≤p≤1018) , p is chosen uniformly and randomly from [0.9×1018,1018] .
The second line contains a integer q(1≤q≤100) . Each line of the following q lines contains an integer a(1≤a≤p−1) , a is chosen from [1,p−1] uniformly and randomly.
输出格式
Output q lines for each number. In each line, prine k first, then x1,x2,…,xk .