#pragma GCC target("avx2") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") #include #include using namespace std; using namespace atcoder; using ll=long long; void IO(){ ios::sync_with_stdio(false); std::cin.tie(nullptr); } ll power(ll a,ll n){ ll res=1; while(n--){ res*=a; } return res; } int main(){ IO(); ll n; cin>>n; vector a(n); for(ll i=0;i>a[i]; } vector s(9); for(ll i=1;i<=8;i++){ for(ll j=0;j