#include using namespace std; using ll=long; using pll=pair; #define vec(type,name,...) vectorname(__VA_ARGS__) #define each(i,a) for(auto&i:a) #define name4(a,b,c,d,...) d #define rep(...) name4(__VA_ARGS__,rep3,rep2,rep1)(__VA_ARGS__) #define rep1(a) rep3(i,0,a) #define rep2(i,a) rep3(i,0,a) #define rep3(i,a,b) for(ll i=a;ibool update_min(T&a,const T&b){if(a>b){a=b;return 1;}return 0;} template bool update_max(T&a,const T&b){if(a>a>>b>>c; ll d=a.size()/2+1,e=b.size()/2+1,f=c.size()/2+1; if(a=="NONE")d=0; if(b=="NONE")e=0; if(c=="NONE")f=0; d=16-d; e=16-e; f=16-f; cout<