#include"bits/stdc++.h"
#include "encoder.h"
#include "encoderlib.h"
using namespace std;
using ll=long long;
#define S second
#define F first
void encode(int n, int a[]) {
for(int i=0;i<n;i++){
for(int j=0;j<8;j++){
send((i<<4)+(j<<1)+(1&(a[i]>>j)));
}
}
}
#include"bits/stdc++.h"
#include "decoder.h"
#include "decoderlib.h"
using namespace std;
using ll=long long;
#define S second
#define F first
void decode(int n, int m, int a[]) {
sort(a,a+m);
int res[n]={};
for(int i=m-1;i>=0;i--){
res[a[i]>>4]=(res[a[i]>>4]<<1)+(1&a[i]);
}
for(int i=0;i<n;i++)output(res[i]);
}