Let's assume that 
 -  *v*(*n*) is the largest prime number, that does not exceed *n*;-  *u*(*n*) is the smallest prime number strictly greater than *n*. 
Find <img align="middle" class="tex-formula" src="https://espresso.codeforces.com/9efda33382293068ce21371b950297a1d3ac3212.png" style="max-width: 100.0%;max-height: 100.0%;"/>.
The first line contains integer *t* (1 ≤ *t* ≤ 500) — the number of testscases. 

Each of the following *t* lines of the input contains integer *n* (2 ≤ *n* ≤ 10<sup class="upper-index">9</sup>).
from fractions import Fraction
import math
from bisect import bisect_left
primes = [2, 3, 5]
def getbiggerandsmallerprimemultiplied(number):
    pos = bisect_left(primes, number)
    if primes[pos]<=number:
        return primes[pos + 1]*primes[pos]
    else:
        return primes[pos - 1]*primes[pos]
until=2
def addprimesuntil(number):
    global until
    for n in range(primes[-1],number,2):
        if primes[until] < int(math.sqrt(n)) + 1:
            until+=1
        if all(n % i for i in primes[:until]):
            primes.append(n)
for t in range(int(input())):
    fraction = Fraction(0)
    for n in range(2,int(input())+1):
        if n >= primes[-1]:
            addprimesuntil(primes[-1]*2)
        fraction += Fraction(1,getbiggerandsmallerprimemultiplied(n))
    print(fraction)