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

int main()
{
    int t;
    cin>>t;
    while (t--)
    {
        int n;
        cin>>n;
        deque<long long int>d;
        for(int i=0;i<n;i++)
        {
            long long int el;
            cin>>el;
            d.push_back(el);
        }
        int count=0;
        while (!d.empty())
        {
            if (count%2==0)
            {
                cout<<d.front()<<" ";
                d.pop_front();
            }
            else
            {
                cout<<d.back()<<" ";
                d.pop_back();
            }
            count++;
        }
        cout<<endl;
    }
}

