#define _GLIBCXX_DEBUG
// #include <bits/stdc++.h>
#include <iostream>
#include <iomanip>
#include <vector>
#include <map>
#include <algorithm>
#include <cmath>
#include <unordered_set>
#include <utility>
#include <tuple>
using namespace std;

using ll = int64_t;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)

const ll INF = 1ll << 60; // 十分大きい値とする (ここでは 2^60)
const ll MOD = 1000000007;
const double PI = acos(-1);

template<class T> void chmin(T &a, T b) {
  if (a > b) a = b;
}

template<class T> void chmax(T &a, T b) {
  if (a < b) a = b;
}

int main() {
  ll N;
  cin >> N;

  double x0, y0;
  cin >> x0 >> y0;

  double xn2, yn2; // x_{N/2}, y_{N/2}
  cin >> xn2 >> yn2;

  // 2点 p_{0}, p_{N/2} の距離
  double dist;
  dist = sqrt((x0 - xn2)*(x0 - xn2) + (y0 - yn2)*(y0 - yn2));

  double theta = PI*(N - 2)/N; // 正N角形の頂点の角度
  double r; // 正N角形の1辺の長さ
  if ((N/2)%2 == 0) {
    double sum_cos = 0;
    double a = theta/2.0;
    rep(i, N/4) {
      sum_cos += 2.0*cos(a);
      a = theta - PI + a;
    }
    r = dist/sum_cos;
  }
  else {
    double sum_cos = 1.0;
    double a = theta/2.0;
    rep(i, (N-2)/4) {
      sum_cos += 2.0*cos(a);
      a = theta - PI + a;
    }
    r = dist/sum_cos;
  }

  // p_{0} から p_{N/2} へのベクトルを長さ r に規格化したもの
  double vx, vy;
  vx = r*(xn2 - x0)/dist;
  vy = r*(yn2 - y0)/dist;

  // p_{0} から p_{1} へのベクトル
  double wx, wy;
  wx =  cos(theta/2.0)*vx + sin(theta/2.0)*vy;
  wy = -sin(theta/2.0)*vx + cos(theta/2.0)*vy;

  cout << fixed << setprecision(11);
  cout << x0 + wx << " " << y0 + wy << endl;
}

#include <bits/stdc++.h>
using namespace std;

#define ll long long
#define forin(in ,n) for(ll i=0; i<n; i++) cin>>in[i]
#define forout(out) for(ll i=0; i<(ll)out.size(); i++) cout<<out[i]<<endl
#define rep(i, n) for (ll i = 0; i < n; ++i)
#define rep_up(i, a, n) for (ll i = a; i < n; ++i)
#define rep_down(i, a, n) for (ll i = a; i >= n; --i)
#define P pair<ll, ll>

#define all(v) v.begin(), v.end()
#define fi first
#define se second
#define vvvll vector<vector<vector<ll>>>
#define vvll vector<vector<ll>>
#define vll vector<ll>
#define pqll priority_queue<ll>
#define pqllg priority_queue<ll, vector<ll>, greater<ll>>

constexpr ll INF = (1ll << 60);
constexpr ll mod = 1000000007;
//constexpr ll mod = 998244353;
constexpr double pi = 3.14159265358979323846;
template <typename T>
inline bool chmax(T &a, T b) {
    if (a < b) {
        a = b;
        return 1;
    }
    return 0;
}
template <typename T>
inline bool chmin(T &a, T b) {
    if (a > b) {
        a = b;
        return 1;
    }
    return 0;
}
template <typename T>
void pt(T val) {
    cout << val << "\n";
}
template <typename T>
void pt_vll(vector<T> &v) {
    ll vs = v.size();
    rep(i, vs) {
        cout << v[i];

        if (i == vs - 1)
            cout << "\n";
        else
            cout << " ";
    }
}
ll mypow(ll a, ll n) {
    ll ret = 1;
    if(n==0) return 1;
    if(a==0) return 0;
    rep(i, n) {
        if (ret > (ll)(1e18 + 10) / a) return -1;
        ret *= a;
    }
    return ret;
}
long long modpow(long long a, long long n, long long mod) {
    long long res = 1;
    while (n > 0) {
        if (n & 1) res = res * a % mod;
        a = a * a % mod;
        n >>= 1;
    }
    return res;
}
long long modinv(long long a, long long m) {
    long long b = m, u = 1, v = 0;
    while (b) {
        long long t = a / b;
        a -= t * b; swap(a, b);
        u -= t * v; swap(u, v);
    }
    u %= m;
    if (u < 0) u += m;
    return u;
}

//自分以外の約数の和
ll enum_sum(ll n){
    ll ret=0;
    if(n==1) return 0;
    for(ll i = 1 ; i*i <= n ; ++i){
        if(n%i == 0){
            ret+=i;
            if(i != 1 && i*i != n){
                ret+=(n/i);
            }
        }
    }
    return ret;
}

int main() {
    ll r,c,n,m,t,k=0,cnt=INF,ans=0;
    string s;
    cin>>t;
    rep(bit,t){
        cin>>n>>s>>s>>s;
        rep(i,n){
            cout<<0;
        }
        rep(i,n){
            cout<<1;
        }
        cout<<0<<endl;
    }
}