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 JAVA):

Solution:
import javax.swing.text.html.StyleSheet;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.*;
import java.util.StringTokenizer;

public class Codeforces {
    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }

    static FastReader s = new FastReader();
    static PrintWriter out = new PrintWriter(System.out);

    private static int[] rai(int n) {
        int[] arr = new int[n];
        for (int i = 0; i < n; i++) {
            arr[i] = s.nextInt();
        }
        return arr;
    }

    private static long[] ral(int n) {
        long[] arr = new long[n];
        for (int i = 0; i < n; i++) {
            arr[i] = s.nextLong();
        }
        return arr;
    }

    private static int ri() {
        return s.nextInt();
    }

    private static long rl() {
        return s.nextLong();
    }

    private static String rs() {
        return s.next();
    }

    static int search(List<Integer> array,int target,int flag)
    {
        int left=0,right=array.size()-1;
        while(left<=right)
        {
            int mid=(left+right)/2;
            if(array.get(mid)>=target)
            {
                if((mid==0 && flag==0)||(mid==array.size()-1 && flag==1))
                {
                    return mid;
                }
                else if((flag==0 && array.get(mid-1)<target ) || (flag==1 && array.get(mid+1)!=target ))
                {
                    return mid;
                }
                else
                {
                    if(flag==0)
                    {right=mid-1;
                    }
                    else
                    {
                        left=mid+1;
                    }
                }
            }
            else
            {
                if(array.get(mid)>target)
                {
                    right=mid-1;
                }
                else
                {
                    left=mid+1;
                }
            }
        }
        return -1;
    }
    public static void main(String[] args) {
        int t=ri();
        StringBuilder ans=new StringBuilder();
        while(t-->0)
        {
            double n=ri();
            double res=1D/(2*Math.tan((Math.PI)/(2*n)));
            ans.append(res*2).append("\n");
        }
        out.print(ans.toString());
        out.flush();
    }
}
class MinHeap {
    List<Integer> heap = new ArrayList<Integer>();

    public MinHeap(List<Integer> array) {
        heap = buildHeap(array);
    }

    public List<Integer> buildHeap(List<Integer> array) {
        // Write your code here.
        int lastParent=(array.size()-2)/2;
        for(int i=lastParent;i>=0;i--)
        {
            siftDown(i,array.size()-1,array);
        }
        return array;
    }

    public void siftDown(int currentIdx, int endIdx, List<Integer> heap) {
        // Write your code here.
        int left=currentIdx*2+1;
        while(left<=endIdx)
        {
            int right=-1;
            if(currentIdx*2+2<=endIdx)
            {
                right=currentIdx*2+2;
            }
            int idx=left;
            if(right!=-1 && heap.get(right)<heap.get(left))
            {
                idx=right;
            }

            if(heap.get(idx)<heap.get(currentIdx))
            {
                int temp=heap.get(idx);
                heap.set(idx,heap.get(currentIdx));
                heap.set(currentIdx,temp);

                currentIdx=idx;
                left=currentIdx*2+1;
            }
            else
            {
                break;
            }
        }

    }

    public void siftUp(int currentIdx, List<Integer> heap) {
        // Write your code here.
        int parentIdx=(currentIdx-1)/2;
        while(currentIdx>0)
        {
            if(heap.get(parentIdx)>heap.get(currentIdx))
            {
                int temp=heap.get(parentIdx);
                heap.set(parentIdx,heap.get(currentIdx));
                heap.set(currentIdx,temp);

                currentIdx=parentIdx;
                parentIdx=(currentIdx-1)/2;
            }
            else
            {
                break;
            }
        }

    }

    public int peek() {
        // Write your code here.
        // if(this.heap.size()==0)
        // {
        // 	return -1;
        // }
        return heap.get(0);
    }

    public int remove() {
        // Write your code here.
        int temp=heap.get(0);
        heap.set(0,heap.get(heap.size()-1));
        heap.set(heap.size()-1,temp);
        int val=heap.get(heap.size()-1);
        heap.remove(heap.size()-1);
        siftDown(0,heap.size()-1,heap);
        return val;
    }
    public void remove(int ind) {
        // Write your code here.
        int temp=heap.get(ind);
        heap.set(ind,heap.get(heap.size()-1));
        heap.set(heap.size()-1,temp);
        int val=heap.get(heap.size()-1);
        heap.remove(heap.size()-1);
        siftDown(ind,heap.size()-1,heap);
//        return val;
    }

    public void insert(int value) {
        // Write your code here.
        heap.add(value);
        int index=heap.size()-1;
        siftUp(index,heap);
    }
}