import java.util.Scanner;
import java.util.StringTokenizer;
public class Solution {
static String[] arr, ans;
static int N, mid, idx;
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int T =sc.nextInt();
for (int tc = 1; tc <= T; tc++) {
StringBuilder sb = new StringBuilder();
int N = sc.nextInt();
arr = new String [N];
ans = new String [N];
for (int i = 0; i < N; i++) {
arr[i] = sc.next();
}
mid = (N + 1 )/ 2;
for (int i = 0; i < N / 2; i++) {
sb.append(arr[i] + " ");
sb.append(arr[mid + i] + " ");
}
if(N % 2 == 1) {
sb.append(arr[mid -1]);
}
System.out.println("#" + tc + " " + sb);
}
}
}