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:
/**
 * Keep yourself motivated
 * Have confidence in yourself
 * And yes don't forget to play your jam :) 
 */

import java.util.*;
import java.lang.*;
import java.io.*;
 
public class Main  {

	static class Solver {
		public String possible(boolean condition) {
			return condition?"YES":"NO";
		}
		
		
		
		public void solve(Scanner in, PrintWriter out) {
//			long n = in.nextLong();
//			long a = in.nextLong();
//			long b = in.nextLong();
//			long c = in.nextLong();
//			long d = in.nextLong();
//			long k = in.nextLong();
			int n = in.nextInt();
//			int k = in.nextInt();
			

			
//			StringBuilder s = new StringBuilder(in.next());
			
			
			
//			int[] a = new int[n];
//			for(int i = 0; i < n; i++) {
//				a[i] = in.nextInt();
//			}
			
//			long[] a = new long[n];
//			for(int i = 0; i < n; i++) {
//				a[i] = in.nextLong();
//			}


//			Arrays.sort(a);
			
			
			double ans = 1.0;
			double nn = n;
			int h = 1;
			
			double p = (2*nn-2)*180;
			p/=2;
			p/=n;
//			out.println(p);
			double x = 90;
			int cnt = 1;
			
			while(h*p>x*cnt) {
				
				ans+=2*(Math.sin(Math.toRadians(h*p-x*cnt)));
				
				cnt+=2;
				h+=1;
				
			}
			
			
			
			out.println(ans);
			

			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
		}
	}
	
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Solver solver = new Solver();
        
        long testCount = Integer.parseInt(in.next());
//        long testCount = 1;
        while (testCount-->0)
            solver.solve(in, out);
        
        out.close();
    }
}
///**
// * Keep yourself motivated
// * Have confidence in yourself
// * And yes don't forget to play your jam :) 
// */
//
//import java.util.*;
//import java.lang.*;
//import java.io.*;
// 
//public class Main  {
//
//	static class Solver {
//		public String possible(boolean condition) {
//			return condition?"YES":"NO";
//		}
//		
//		
//		
//		public void solve(Scanner in, PrintWriter out) {
////			long n = in.nextLong();
////			long a = in.nextLong();
////			long b = in.nextLong();
////			long c = in.nextLong();
////			long d = in.nextLong();
////			long k = in.nextLong();
////			int n = in.nextInt();
////			int k = in.nextInt();
//			
//
//			
//			StringBuilder s = new StringBuilder(in.next());
//			
//			
//			
////			int[] a = new int[n];
////			for(int i = 0; i < n; i++) {
////				a[i] = in.nextInt();
////			}
//			
////			long[] a = new long[n];
////			for(int i = 0; i < n; i++) {
////				a[i] = in.nextLong();
////			}
//
//
////			Arrays.sort(a);
//			
//			ArrayList<Integer> num = new ArrayList<Integer>();
//			ArrayList<Character> ch = new ArrayList<Character>();
//			
//			
//			char prev = s.charAt(0);
//			char curr = s.charAt(0);
//			int n = 1;
//			
//			for(int i = 1; i < s.length(); i++) {
//				curr = s.charAt(i);
//				
//				if(prev == curr) {
//					n++;
//				} else {
//					num.add(n);
//					ch.add(prev);
//					n = 1;
//				}
//				
//				prev = curr;
//			}
//			
//			num.add(n);
//			ch.add(curr);
//			
//			
////			for(int i = 0; i < num.size(); i++) {
////				out.print(num.get(i) + " ");
////				out.println(ch.get(i));
////			}
//			
//			
//			int min = Integer.MAX_VALUE;
//			
//			
//			HashSet<Character> set = new HashSet<Character>();
//			char c = '0';
////			int n1 = 0;
////			int n2 = 0;
////			int n3 = 0;
//			int k = 0;
//			boolean flag = false;
//			
//			for(int i = 0; i < num.size(); i++) {
//				n = num.get(i);
//				c = ch.get(i);
//				
////				if(c == '1') n1 = n;
////				else if(c == '2') n2 = n;
////				else n3 = n;
//				
//				if(!set.contains(c)) {
//					set.add(c);
//				} else {
//					
//					set.clear();
//					set.add(c);
//					set.add(prev);
//					
//				}
//				
//				
//				if(set.size() == 3) {
//					min = Math.min(min, k+2);
//					flag= true;
//				}
//				
//				prev = c;
//				k = n;
//			}
//			
//			
//			if(!flag) min = 0;
//			
//			
//			out.println(min);
//			
//			
//			
//			
//			
//			
//			
//			
//			
//			
//			
//			
//			
//			
//			
//		}
//	}
//	
//    public static void main(String[] args) {
//        InputStream inputStream = System.in;
//        OutputStream outputStream = System.out;
//        Scanner in = new Scanner(inputStream);
//        PrintWriter out = new PrintWriter(outputStream);
//        Solver solver = new Solver();
//        
//        long testCount = Integer.parseInt(in.next());
////        long testCount = 1;
//        while (testCount-->0)
//            solver.solve(in, out);
//        
//        out.close();
//    }
//}