#include using namespace std; typedef long long ll; templatebool chmax(T &a, const T &b) { if (abool chmin(T &a, const T &b) { if (b A,vector B){ int N=si(A); for(int i=0;i10000) return false; if(B[i]<0) return false; if(B[i]>10000) return false; if(i+1>N; if(N%3==0){ for(int i=0;i=N/3*2) cout<<1+3*i+3<<" "; else cout<<1+3*i<<" "; } cout<=N/3*2+1){ if(i==N-1) cout<<1+3*i+4<<" "; else cout<<1+3*i+3<<" "; } else cout<<1+3*i<<" "; } cout< A(N),B(N); while(1){ int sum=0; for(int i=0;i A(N),B(N); for(int i=0;i