Suppose that we are given a n×n integer grid, e.g. (i,j)_i=0,j=0n−1,n−1. Let l_n be the number of different lines that intersect with at least two points on the grid.
For n=3, there are exactly 20 such lines, as drawn on the image below.

Compute l_n for all given n.
First line contains an integer Q – the number of queries. The second line contains Q space-separated integers n_1,…,n_Q.
Print Q numbers l_n_1,…,l_n_N, each in its own line. Since l_k can be large, print them modulo 106+3.