Problem: The statement of this problem is the same as the statement of problem C1. 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 odd integer n (3 ≤ n ≤ 199). 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
3
5
199


Output


1.931851653
3.196226611
126.687663595

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
long long int mypow(long long int a, long long int b) {
  long long int res = 1;
  while (b) {
    if (b & 1) res = res * a;
    b >>= 1;
    if (b) {
      a = a * a;
    }
  }
  return res;
}
long long int modpow(long long int a, long long int b,
                     long long int m = 1000000007) {
  a %= m;
  long long int res = 1;
  while (b) {
    if (b & 1) res = res * a % m;
    b >>= 1;
    if (b) {
      a = a * a % m;
    }
  }
  return res;
}
long long int modinv(long long int a) {
  return modpow(a, 1000000007 - 2, 1000000007);
}
vector<long long int> power(11);
void initl() {
  vector<int> p = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31};
  for (int(i) = (0); (i) < (p.size()); ++(i)) {
    power[i] = modpow(2, p[i]) - 1;
  }
}
bool mycompr(pair<int, int> i1, pair<int, int> i2) {
  return i1.second > i2.second;
}
void bfs(int root, int par, vector<bool> &vis, vector<long long int> &dist,
         vector<vector<int> > &adj) {
  queue<int> q;
  q.push(root);
  dist[root] = 0;
  vis[root] = true;
  while (!q.empty()) {
    int p = q.front();
    q.pop();
    for (int i = 0; i < adj[p].size(); i++) {
      if (vis[adj[p][i]] == false) {
        dist[adj[p][i]] = dist[p] + 1;
        q.push(adj[p][i]);
        vis[adj[p][i]] = true;
      }
    }
  }
}
void graph(vector<vector<int> > &adj, int m) {
  int x, y;
  for (int(i) = (0); (i) < (m); ++(i)) {
    cin >> x >> y;
    adj[x].push_back(y);
    adj[y].push_back(x);
  }
}
void unique_elem(vector<long long int> &v) {
  sort(v.begin(), v.end());
  auto ip = unique(v.begin(), v.end());
  v.resize(distance(v.begin(), ip));
}
void unique_elem_with_count(vector<long long int> &a,
                            vector<long long int> &unique,
                            vector<long long int> &cnt_unique,
                            vector<long long int> &sum_unique, int n) {
  sort(a.begin(), a.end());
  long long int j = 0;
  long long int sum = 0;
  while (j < n) {
    long long int cnt = 1;
    if (j != n - 1) {
      while (a[j + 1] == a[j]) {
        cnt++;
        j++;
        if (j == n - 1) {
          break;
        }
      }
    }
    sum += cnt;
    unique.push_back(a[j]);
    cnt_unique.push_back(cnt);
    sum_unique.push_back(sum);
    j++;
  }
}
vector<int> spf(1000005);
void sieve() {
  spf[1] = 1;
  for (int i = 2; i < 1000005; i++) spf[i] = i;
  for (int i = 4; i < 1000005; i += 2) spf[i] = 2;
  for (int i = 3; i * i < 1000005; i++) {
    if (spf[i] == i) {
      for (int j = i * i; j < 1000005; j += i) {
        if (spf[j] == j) {
          spf[j] = i;
        }
      }
    }
  }
}
vector<int> getFactorization(int x) {
  vector<int> ret;
  map<int, int> fact;
  while (x != 1) {
    ret.push_back(spf[x]);
    if (fact.find(spf[x]) == fact.end()) {
      fact[spf[x]] = 1;
    } else {
      fact[spf[x]]++;
    }
    x = x / spf[x];
  }
  for (auto it = fact.begin(); it != fact.end(); it++) {
    if (it->second & 1) {
      ret.push_back(it->first);
    }
  }
  return ret;
}
vector<long long int> factr(100005);
vector<long long int> modinvr(100005);
vector<long long int> modinvrfact(100005);
void modularInverse() {
  modinvr[0] = modinvr[1] = 1;
  for (int i = 2; i < 100005; i++)
    modinvr[i] =
        modinvr[1000000007 % i] * (1000000007 - 1000000007 / i) % 1000000007;
}
void compute() {
  factr[0] = 1;
  modinvr[0] = 1;
  for (int(i) = (1); (i) < (100005); ++(i)) {
    factr[i] = (factr[i - 1] * i) % 1000000007;
    modinvrfact[i] = modinv(factr[i]) % 1000000007;
  }
}
void decToBinary(int n) {
  int binaryNum[32];
  int i = 0;
  while (n > 0) {
    binaryNum[i] = n % 2;
    n = n / 2;
    i++;
  }
}
bool containsOnlyDigit(string str) {
  int l = str.length();
  for (int i = 0; i < l; i++) {
    if (str.at(i) < '0' || str.at(i) > '9') return false;
  }
  return true;
}
void swap(int &first, int &second) {
  int temp = first;
  first = second;
  second = temp;
}
int str_to_num(string second) { return stoi(second); }
string int_to_str(int n) { return to_string(n); }
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  cin >> t;
  int tt = 1;
  while (t--) {
    long double n;
    cin >> n;
    double pi = 2 * acos(0.0);
    long double r = 1.0 / (2 * (sin(pi / (2 * n))));
    long double ans =
        sqrtl(2) * r *
        (sin(pi / 4 * (1 - 1.0 / n)) + sin(pi / 4 * (1 + 1.0 / n)));
    cout << fixed;
    cout << setprecision(7);
    cout << ans << '\n';
    tt++;
  }
}