#include using namespace std; //#define int long long typedef pairpint; typedef vectorvint; typedef vectorvpint; #define endl '\n' #define pb push_back #define mp make_pair #define fi first #define se second #define all(v) (v).begin(),(v).end() #define rep(i,n) for(int i=0;i<(n);i++) #define reps(i,f,n) for(int i=(f);i<(n);i++) #define each(it,v) for(__typeof((v).begin()) it=(v).begin();it!=(v).end();it++) templatevoid chmin(T &t,U f){if(t>f)t=f;} templatevoid chmax(T &t,U f){if(t>n;a.resize(n); rep(i,n)cin>>a[i]; vint hs; rep(i,n)hs.pb(a[i]); sort(all(hs)); hs.erase(unique(all(hs)),hs.end()); rep(i,n)a[i]=lower_bound(all(hs),a[i])-hs.begin(); int cnt[100]={}; rep(i,n)cnt[a[i]]++; int ans=0; while(true){ int tmp=0; for(int i=0;i>T; while(T--)solve(); }