Prime numbers are arranged in a ordered list U$U$, in increasing order. Let S$S$ be a sublist of U$U$ with a unique property that for every element A$A$ belonging to list S$S$, if i$i$ denotes the index of A$A$ in list U$U$, than i$i$ also belongs to list U$U$.
Given N$N$, find sum of first N$N$ elements of list S$S$, assuming 1-based indexing.
As the sum can be very large, print the sum modulo 109+7$10^{9}+7$.

-----Input:-----
-The first line of the input contains a single integer T$T$ denoting the number of test cases.
-Only line of each test case has an integer N$N$ .

-----Output:-----
For each test case, print a single integer denoting the sum of first N$N$ elements of set S$S$ modulo 109+7$10^{9}+7$.

-----Constraints-----
- 1≤T≤10000$1 \leq T \leq 10000$
- 1≤N≤1000$1 \leq N \leq 1000$

-----Subtasks-----
- 
20 points : 
- 
1≤T≤10000$1 \leq T \leq 10000$
- 
1≤N≤10$1 \leq N \leq 10$
- 
20 points :
- 
1≤T≤100$1 \leq T \leq 100$
- 
1≤N≤100$1 \leq N \leq 100$
- 
60 points : Original Constraints

-----Sample Input:-----
2

1
2

-----Sample Output:-----
3
8

-----EXPLANATION:-----
Example case 1: 
First few elements of set S$S$ are  {3,5,11…}  , so sum is 3.
Example case 2: 
Sum is 3+5=8.

```python

USER_FILENAME = "<user_code>"
import sys, json, builtins
import math, heapq, bisect, itertools, functools, collections, statistics, fractions, decimal, operator, array, random, re, string, os, pathlib
try:
    import resource as _res
except Exception:
    _res = None
from collections import Counter, defaultdict, deque, OrderedDict
from functools import lru_cache, reduce
from itertools import accumulate, permutations, combinations, product
from math import gcd, ceil, floor, sqrt
from decimal import Decimal
try:
    from typing import *
except Exception:
    pass
try:
    sys.setrecursionlimit(1_000_000)
except Exception:
    pass
try:
    import site as _site
    try:
        _sys_sites = _site.getsitepackages() if hasattr(_site, "getsitepackages") else []
        for _p in _sys_sites:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
    try:
        _usp = _site.getusersitepackages()
        if isinstance(_usp, str):
            _usp = [_usp]
        for _p in _usp:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
except Exception:
    pass

ns = {"__name__": "__main__"}
for _k, _v in list(globals().items()):
    if not _k.startswith("_"):
        ns[_k] = _v
_CODE = 's=[3, 8, 19, 36, 67, 108, 167, 234, 317, 426, 553, 710, 889, 1080, 1291, 1532,\r\n1809, 2092, 2423, 2776, 3143, 3544, 3975, 4436, 4945, 5492, 6055, 6642, 7241, \r\n7858, 8567, 9306, 10079, 10876, 11735, 12612, 13531, 14498, 15489, 16520, 17583,\r\n18670, 19823, 20994, 22195, 23412, 24709, 26118, 27551, 28998, 30469, 31968, \r\n33491, 35088, 36709, 38378, 40101, 41842, 43629, 45452, 47299, 49212, 51239, \r\n53302, 55383, 57482, 59703, 61972, 64313, 66664, 69045, 71462, 73939, 76488, \r\n79097, 81744, 84427, 87146, 89895, 92698, 95595, 98504, 101505, 104524, 107591,\r\n110700, 113869, 117098, 120357, 123656, 126975, 130382, 133851, 137368, 140927,\r\n144520, 148157, 151890, 155651, 159562, 163505, 167532, 171623, 175756, 179909, \r\n184126, 188399, 192738, 197135, 201556, 206019, 210536, 215085, 219652, 224315,\r\n229074, 233861, 238662, 243539, 248472, 253415, 258436, 263495, 268602, 273791,\r\n279072, 284453, 289894, 295397, 300954, 306577, 312228, 317929, 323678, 329479,\r\n335330, 341199, 347236, 353349, 359566, 365795, 372106, 378429, 384782, 391143,\r\n397612, 404211, 410864, 417525, 424216, 431039, 437880, 444743, 451642, 458699,\r\n465808, 473001, 480284, 487635, 495052, 502533, 510056, 517663, 525312, 533011,\r\n540764, 548605, 556488, 564499, 572558, 580659, 588776, 596997, 605230, 613517,\r\n621894, 630283, 638796, 647323, 655904, 664623, 673370, 682131, 690938, 699787,\r\n708710, 717709, 726750, 735853, 745146, 754465, 763868, 773329, 782868, 792487,\r\n802148, 811887, 821720, 831579, 841502, 851475, 861484, 871563, 881732, 891999,\r\n902432, 912889, 923376, 933935, 944524, 955155, 965818, 976505, 987228, 998081,\r\n1008942, 1019851, 1031108, 1042419, 1053788, 1065235, 1076868, 1088611, 1100478,\r\n1112387, 1124314, 1136267, 1148274, 1160371, 1172484, 1184627, 1196830, 1209131,\r\n1221540, 1233961, 1246418, 1258897, 1271400, 1283947, 1296594, 1309357, 1322198,\r\n1335157, 1348160, 1361197, 1374300, 1387471, 1400688, 1413985, 1427316, 1440785,\r\n1454298, 1467889, 1481502, 1495151, 1508844, 1522553, 1536310, 1550169, 1564220,\r\n1578327, 1592486, 1606663, 1621100, 1635579, 1650082, 1664673, 1679386, 1694109,\r\n1708892, 1723759, 1738682, 1753651, 1768712, 1783939, 1799210, 1814509, 1829822,\r\n1845235, 1860746, 1876387, 1892070, 1907893, 1923866, 1939927, 1956000, 1972091,\r\n1988218, 2004359, 2020612, 2037023, 2053474, 2069993, 2086686, 2103389, 2120290,\r\n2137211, 2154328, 2171517, 2188808, 2206141, 2223518, 2240905, 2258322, 2275805,\r\n2293344, 2310971, 2328630, 2346391, 2364302, 2382289, 2400338, 2418487, 2436668,\r\n2454885, 2473114, 2491425, 2509858, 2528301, 2546918, 2565579, 2584298, 2603055,\r\n2621842, 2640759, 2659772, 2678985, 2698418, 2717881, 2737382, 2756959, 2776718,\r\n2796495, 2816314, 2836227, 2856274, 2876337, 2896444, 2916605, 2936836, 2957133,\r\n2977474, 2997915, 3018392, 3039111, 3059870, 3080643, 3101516, 3122415, 3143374,\r\n3164463, 3185612, 3206791, 3227982, 3249251, 3270568, 3291947, 3313440, 3334969,\r\n3356556, 3378283, 3400040, 3421857, 3443794, 3465821, 3487888, 3509981, 3532348,\r\n3554897, 3577548, 3600269, 3623020, 3645831, 3668684, 3691591, 3714678, 3737887,\r\n3761138, 3784569, 3808108, 3831671, 3855340, 3879141, 3903028, 3926927, 3950856,\r\n3974875, 3998946, 4023053, 4047186, 4071337, 4095534, 4119785, 4144164, 4168583,\r\n4193022, 4217531, 4242162, 4266833, 4291614, 4316473, 4341390, 4366447, 4391610,\r\n4416911, 4442218, 4467575, 4492984, 4518407, 4544008, 4569741, 4595504, \r\n4621345, 4647264, 4673233, 4699236, 4725425, 4751688, 4778059, 4804482,\r\n4830971, 4857562, 4884255, 4911038, 4937959, 4964912, 4991929, 5019002,\r\n5046093, 5073530, 5100987, 5128568, 5156257, 5183990, 5211799, 5239646,\r\n5267589, 5295646, 5323755, 5352034, 5380341, 5408734, 5437307, 5465950,\r\n5494607, 5523414, 5552515, 5581652, 5610805, 5640074, 5669407, 5698790,\r\n5728273, 5757842, 5787483, 5817166, 5846969, 5877040, 5907131, 5937244,\r\n5967377, 5997630, 6028187, 6058764, 6089425, 6120132, 6150913, 6181742,\r\n6212611, 6243492, 6274525, 6305594, 6336775, 6367964, 6399231, 6430508,\r\n6461997, 6493510, 6525177, 6556906, 6588909, 6621052, 6653285, 6685546,\r\n6717845, 6750168, 6782509, 6815042, 6847645, 6880364, 6913161, 6946072,\r\n6979005, 7011974, 7044987, 7078016, 7111099, 7144290, 7177493, 7210840,\r\n7244297, 7277766, 7311335, 7344982, 7378731, 7412500, 7446327, 7480238,\r\n7514205, 7548262, 7582521, 7616872, 7651239, 7685660, 7720203, 7754810, \r\n7789461, 7824190, 7859033, 7893952, 7928975, 7964056, 7999367, 8034730,\r\n8070123, 8105630, 8141247, 8176978, 8212779, 8248756, 8284749, 8320832, \r\n8357083, 8393376, 8429683, 8466134, 8502697, 8539296, 8575979, 8612826, \r\n8649713, 8686642, 8723585, 8760582, 8797631, 8834692, 8871909, 8909182, \r\n8946671, 8984328, 9022159, 9060012, 9097901, 9135868, 9173907, 9211960, \r\n9250113, 9288464, 9326841, 9365300, 9403969, 9442680, 9481513, 9520364,\r\n9559281, 9598324, 9637523, 9676740, 9715979, 9755296, 9794747, 9834256,\r\n9873777, 9913510, 9953489, 9993582, 10033733, 10073896, 10114173, 10154462,\r\n10194921, 10235404, 10275981, 10316618, 10357311, 10398112, 10438931, 10479828,\r\n10520789, 10561840, 10603191, 10644658, 10686149, 10727746, 10769393, 10811112, \r\n10852955, 10894938, 10936981, 10979162, 11021455, 11063762, 11106223, 11148722,\r\n11191291, 11233934, 11276631, 11319484, 11362347, 11405326, 11448477, 11491700,\r\n11534983, 11578296, 11621687, 11665320, 11708971, 11752758, 11796647, 11840676,\r\n11884787, 11928958, 11973179, 12017632, 12062253, 12106886, 12151543, 12196272, \r\n12241025, 12285834, 12330713, 12375684, 12420745, 12465936, 12511265, 12556806,\r\n12602363, 12647994, 12693667, 12739530, 12785501, 12831738, 12878017, 12924324,\r\n12970673, 13017114, 13063565, 13110138, 13156757, 13203508, 13250631, 13297868,\r\n13345165, 13392582, 13440145, 13487768, 13535481, 13583318, 13631175, 13679086,\r\n13727049, 13775122, 13823253, 13871512, 13919793, 13968130, 14016611, 14065144,\r\n14113737, 14162384, 14211115, 14259866, 14308687, 14357534, 14406565, 14455704,\r\n14504911, 14554322, 14603773, 14653296, 14702935, 14752602, 14802341, 14852130,\r\n14901973, 14952096, 15002273, 15052614, 15102997, 15153494, 15204085, 15254792,\r\n15305649, 15356708, 15407839, 15458976, 15510169, 15561596, 15613113, 15664694,\r\n15716293, 15768062, 15819891, 15871784, 15923835, 15975998, 16028299, 16080662,\r\n16133373, 16186142, 16239001, 16291904, 16344885, 16397954, 16451047, 16504160,\r\n16557393, 16610692, 16664045, 16717422, 16770859, 16824540, 16878299, 16932076,\r\n16985895, 17039896, 17093909, 17147992, 17202243, 17256520, 17310851, 17365222,\r\n17419823, 17474490, 17529217, 17583996, 17638877, 17693878, 17749229, 17804818,\r\n17860427, 17916088, 17971769, 18027466, 18083199, 18138986, 18194829, 18250826,\r\n18306907, 18363008, 18419205, 18475516, 18531909, 18588478, 18645089, 18701722,\r\n18758423, 18815406, 18872443, 18929550, 18986743, 19044002, 19101331, 19158728,\r\n19216221, 19273870, 19331559, 19389290, 19447041, 19504844, 19562691, 19620608,\r\n19678551, 19736608, 19794675, 19852892, 19911201, 19969712, 20028279, 20086978,\r\n20145885, 20205034, 20264243, 20323660, 20383107, 20442758, 20502481, 20562260,\r\n20622093, 20682044, 20742145, 20802294, 20862517, 20922860, 20983233, 21043742,\r\n21104389, 21165116, 21225937, 21286806, 21347749, 21408800, 21470031, 21531388,\r\n21592997, 21654624, 21716275, 21777998, 21839817, 21901688, 21963667, 22025808,\r\n22088081, 22150408, 22212831, 22275298, 22337805, 22400432, 22463193, 22525984,\r\n22588905, 22651886, 22714945, 22778058, 22841299, 22904612, 22968003, 23031446,\r\n23094913, 23158440, 23222029, 23285658, 23349367, 23413160, 23477241, 23541398,\r\n23605849, 23670332, 23735011, 23799758, 23864611, 23929562, 23994831, 24060202,\r\n24125759, 24191346, 24256955, 24322656, 24388387, 24454164, 24520003, 24585884,\r\n24651973, 24718152, 24784525, 24851094, 24917843, 24984664, 25051515, 25118474,\r\n25185517, 25252658, 25319815, 25387062, 25454333, 25521682, 25589129, 25656706,\r\n25724313, 25792196, 25860097, 25928168, 25996267, 26064486, 26132725, 26201162,\r\n26269801, 26338488, 26407199, 26475942, 26544763, 26613782, 26682891, 26752054,\r\n26821247, 26890584, 26960075, 27029728, 27099425, 27169192, 27239309, 27309432,\r\n27379639, 27449868, 27520165, 27590492, 27660915, 27731396, 27801967, 27872588,\r\n27943251, 28014094, 28084985, 28155942, 28227023, 28298166, 28369453, 28440840,\r\n28512311, 28584072, 28655909, 28727850, 28799843, 28871862, 28944113, 29016450,\r\n29089009, 29161682, 29234409, 29307310, 29380241, 29453190, 29526199, 29599320,\r\n29672579, 29745910, 29819279, 29892732, 29966489, 30040432, 30114503, 30188596,\r\n30262797, 30337108, 30411431, 30485940, 30560467, 30635196, 30710155, 30785366,\r\n30860635, 30936066, 31011695, 31087384, 31163091, 31239028, 31315011, 31391042,\r\n31467121, 31543284, 31619545, 31695948, 31772429, 31848966, 31925597, 32002270,\r\n32079027, 32155804, 32232687, 32309600, 32386647, 32463748, 32540939, 32618188,\r\n32695451, 32772828, 32850259, 32927816, 33005535, 33083282, 33161095, 33239174,\r\n33317313, 33395516, 33473799, 33552116, 33630583, 33709092, 33787741, 33866462,\r\n33945249, 34024168, 34103279, 34182430, 34261589, 34341082, 34420641, 34500458,\r\n34580319, 34660226, 34740297, 34820504, 34900845, 34981274, 35061747, 35142238,\r\n35222795, 35303532, 35384315, 35465232]\r\nfor j in range(int(input())):\r\n    n=int(input())\r\n    print(s[n-1])\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n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