#include <cmath>
#include <iostream>
using namespace std;
int a[105];
void huafen(int l,int r){
if (l == r) return;
int mid = ceil((l + r) / 2);
int tmp[105] = {0},tmp2 = {0};
cout << "[";
for (int i = l; i <= mid;i++){
cout << a[i] << " ";
}
cout << "],[";
for (int i = mid + 1; i <= r;i++){
tmp2 = a[i];
cout << a[i] << " ";
}
cout << "]" << endl;
huafen(l,mid);
huafen(mid + 1,r);
}
int main(){
int n;
cin >> n;
for (int i = 1; i <= n; i++){
cin >> a[i];
}
huafen(1,n);
return 0;
}