Problem: The statement of this problem is the same as the statement of problem C2. The only difference is that, in problem C1, n is always even, and in C2, n is always odd.

You are given a regular polygon with 2 ⋅ n vertices (it's convex and has equal sides and equal angles) and all its sides have length 1. Let's name it as 2n-gon.

Your task is to find the square of the minimum size such that you can embed 2n-gon in the square. Embedding 2n-gon in the square means that you need to place 2n-gon in the square in such way that each point which lies inside or on a border of 2n-gon should also lie inside or on a border of the square.

You can rotate 2n-gon and/or the square.

Input

The first line contains a single integer T (1 ≤ T ≤ 200) — the number of test cases.

Next T lines contain descriptions of test cases — one per line. Each line contains single even integer n (2 ≤ n ≤ 200). Don't forget you need to embed 2n-gon, not an n-gon.

Output

Print T real numbers — one per test case. For each test case, print the minimum length of a side of the square 2n-gon can be embedded in. Your answer will be considered correct if its absolute or relative error doesn't exceed 10^{-6}.

Example

Input


3
2
4
200


Output


1.000000000
2.414213562
127.321336469

Solution (in PYTHON3):

Solution:

'''test=int(input())
for i in range(test):
    a,b,c,d=[int(i) for i in input().split(" ")]
    x,y,x1,y1,x2,y2=[int(i) for i in input().split(" ")]
    ans1=0
    ans2=0
    if abs(x-x1)>=a and abs(x2-x)>=b:
        ans1=1
    elif abs(x-x1)>=a:
        if abs(x2-(x-a))>=b:
            ans1=1
    elif abs(x2-x)>=b:
        if abs(x+b-x1)>=a:
            ans1=1
    if abs(y-y1)>=c and abs(y2-y)>=d:
        ans2=1
    elif abs(y-y1)>=c:
        if abs(y2-(y-c))>=d:
            ans2=1
    elif abs(y2-y)>=d:
        if abs(y+d-y1)>=c:
            ans2=1
    
    if ans1&ans2:
        print("YES")
    else:
        print("NO")'''

'''b=int(input())
s1=[int(i) for i in input().split(' ')]
g=int(input())
s2=[int(i) for i in input().split(" ")]
s1.sort()
s2.sort()
ans=0
for i in range(b):
    for j in range(g):
        if abs(s1[i]-s2[j])<=1:
            s2[j]=1000
            ans+=1
            break
print(ans)
'''

#CF 639

'''test=int(input())
for i in range(test):
    n,m=[int(i) for i in input().split()]
    if n==1:
        print("YES")
    elif '''


'''test=int(input())
def value(t):
    return (t*(3*t+1))/2
def f(x):
    if x<2:
        return 0
    elif x==2:
        return 1
    else:
        h=1
        k=2
        
        while k<=x:
            h+=1
            k=value(h)
        card_used=value(h-1) if k!=x else k
        return 1+f(x-card_used)

for i in range(test):
    n=int(input())
    
    ans=f(n)
    #print(value(4))
    print(ans)  
    '''

#CF  640 (DIV-4)

'''test=int(input())
for i in range(test):
    n=int(input())
    ans=[]
    c=0
    while n:
        k=10**(c)
        ans.append((n%10)*k)
        c+=1
        n=n//10
    tes=[i for i in ans if i]
    print(len(tes))
    for j in tes:
        print(j,end=" ")'''

'''test=int(input())
for i in range(test):
    n,k=[int(i) for i in input().split()]'''


'''test=int(input())
for i in range(test):
    n,k=[int(i) for i in input().split()]
    jump=n-1
    if k<n:
        rank=k
    else:
        rank=k+int((k-1)//(n-1)) 
    
   
    print(rank)'''



'''test=int(input())
for i in range(test):
    n=int(input())
    arr=[int(i) for i in input().split()]
    i=-1
    j=n
    rem=n
    alice=0
    bob=0
    prev=0
    flag=1
    cnt=0
    while rem>0 and j!=i:
        gain=0
        if flag:
            while gain<=prev and rem>0 and i!=j:
                i+=1
                gain+=arr[i]
                rem-=1
            flag=0
            alice+=gain
            prev=gain

        else:
            while gain<=prev and rem>0 and j!=i:
                j-=1
                gain+=arr[j]
                rem-=1
            flag=1
            bob+=gain
            prev=gain
        cnt+=1
    print(cnt,alice,bob,sep=" ")
    '''

#CF 641

'''test=int(input())
def f(n):
    i=2
    while i**2<=n:
        if n%i==0:
            return i
        i+=1
    return n


for i in range(test):
    n,k=[int(i) for i in input().split()]
    if n%2:
        n+=f(n)
        n+=2*(k-1)
    elif not n%2:
        n+=2*(k)
    print(n)'''

'''test=int(input())
for i in range(test):
    n=int(input())
    arr=[int(i) for i in input().split()]
    dp=[1]*(n)
    for i in range(len(arr)-1,-1,-1):
        flag=0
        intial=2
        mul=(i+1)*2
        while mul<=len(arr):
            if arr[mul-1]>arr[i]:
               dp[i]=max(dp[i],1+dp[mul-1])
            intial+=1
            mul=(i+1)*intial
    print(max(dp)) '''


#CF 642(DIV.-3)

'''test=int(input())
for i in range(test):
    n,m=[int(i) for i in input().split()]
    if n==1:
        print(0)
    elif n==2:
        print(m)
    else:
        print(2*m)'''
'''
test=int(input())
for i in range(test):
    n,k=[int(i) for i in input().split()]
    a=[int(i) for i in input().split()]
    b=[int(i) for i in input().split()]
    if k==0:
        print(sum(a))
    else:
        a.sort()
        b.sort(reverse=True)
        for i in range(k):
            if a[i]<b[i]:
                a[i]=b[i]
        print(sum(a))'''

'''test=int(input())
for i in range(test):
    n=int(input())
    if n==3:
        print(8)
    elif n==1:
        print(0)    
    else:
        k=int((n-1)/2)
        expo=(k*(k+1)*(2*k+1))/3
        to=(k*(k+1))/2
        expo-=to
        ans=4*(expo+(k*(k+1))/2)
        print(int(ans))'''


'''test=int(input())
stack=[]
for i in range(test):
    n=int(input())
    ans=[0]*(n)
    if n%2:
        
        ans[int(n//2)]=1
        i=0
        k=2
        while ans[i]!=1:
            ans[i]=k
            k+=2
            i+=1
        i+=1
        k=3
        while i<n:
            ans[i]=k
            i+=1
            k+=2
    else:
        rank=0
        stack.append((0,n-1))
        while rank<n:
            curr=stack.pop(0)
            rank+=1
            len_=curr[1]-curr[0]+1
            mid=curr[0]+int((curr[1]-curr[0])/2)
            ans[mid]=rank
            a1=(curr[0],mid-1)
            a2=(mid+1,curr[1])
            
            if a1[1]-a1[0]+1>=a2[1]-a2[0]+1:
                stack.append(a1)
                stack.append(a2)
            else:
                stack.append(a2)
                stack.append(a1)
            print(stack)
        



    print(ans)'''
#CF 643 (DIV-2)

'''test=int(input())
def digits(n):
    res=[]
    i=10
    while n:
        res.append(n%10)
        n=n//10
    return res


for i in range(test):
    a,k=[int(i) for i in input().split()]
    #digis=[int(i) for i in str(a)]
    incre=1
    k-=1
    while k and incre:
        k-=1
        dig=digits(a)
        #print(dig)
        incre=min(dig)*max(dig)
        a+=incre
        
    print(a)'''



'''test=int(input())
for i in range(test):
    n=int(input())
    arr=[int(i) for i in input().split()]
    arr.sort(reverse=True)
    i=0
    cnt=0
    dp=[0]*(n)
    for i in range(n-1,-1,-1):
        if i+arr[i]>n:
            dp[i]=0
        elif i+arr[i]==n:
            dp[i]=1
        else:
            dp[i]=1+dp[i+arr[i]]

    print(max(dp))'''

'''a,b,c,d=[int(i) for i in input().split()]


def find(lim,num):
    l=lim[0]
    r=lim[1]
    ans=-1
    while l<=r:
        mid=l+int((r-l)/2)
        if mid<num:
            ans=mid
            l=mid+1
        else:
            r=mid-1
    return ans-c+1 if ans!=-1 else -1
if a==b==c==d:
    print(1)
else:    
    cnt=0
    for i in range(a,b+1):
        for j in range(b,c+1):
            k=find((c,d),i+j)
            if k!=-1:
                #print(k,i,j)
                cnt+=k
    print(cnt)'''


#EDUCATIONAL ROUND
'''test=int(input())
for i in range(test):
    a,b,c,d=[int(i) for i in input().split()]
    if b>=a:
        print(b)
    elif c-d<=0:
        print(-1)
    else:
        a-=b
        diff=c-d
        ans=(b+(a+diff-1)//diff*c)
        print(ans)'''








'''test=int(input())
for i in range(test):
    s=input()
    l=0
    dis=len(s)+1
    char={"1":0,'2':0,"3":0}
    for i in range(len(s)):
        char[s[i]]+=1
        while all(t>0 for t in char.values()):
            dis=min(dis,i-l+1)
            char[s[l]]-=1
            l+=1
    print(dis) if dis<=len(s) else print(0)'''


import math
test=int(input())
for i in range(test):
    n=int(input())
    n=2*n
    tan_=math.tan(math.pi/n)
    a=1/(tan_)
    print("%.9f"%a)