#include <bits/stdc++.h>

using namespace std;
#define ll long long

void fast() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
}

int main() {
    int test;
    cin >> test;
    while (test--) {
        int n;
        cin >> n;
        deque<int> d;
        for (int i = 0; i < n; i++) {
            int x;
            cin >> x;
            d.push_back(x);
        }
        while (!d.empty()) {
            cout << d.front() << " ";
            d.pop_front();
            if (!d.empty()) {
                cout << d.back() << " ";
                d.pop_back();
            }
        }
        cout << "\n";
    }

    return 0;
}
