#include <iostream>
using namespace std;
#include <cstdlib>
#include <gmp.h>
#include <cstdarg>
#include <vector>
#include <bitset>

template <int arr_l, int bit_l>
bitset<arr_l*bit_l> merge(bitset<bit_l>* bs) {
    string s = "";
    for (int i = 0; i < arr_l; i++) {
        s = s + bs[i].to_string();
    }
    return bitset <arr_l*bit_l>(s);
}