#include using namespace std; #define int long long const int p=1e9+7; int po(int a,int b) {if(b==0) return 1; if(b==1) return a; if(b%2==0) {int u=po(a,b/2);return (u*1LL*u)%p;} else {int u=po(a,b-1);return (a*1LL*u)%p;}} int inv(int x) {return po(x,p-2);} mt19937 rnd; #define app push_back #define all(x) (x).begin(),(x).end() #ifdef LOCAL #define debug(...) [](auto...a){ ((cout << a << ' '), ...) << endl;}(#__VA_ARGS__, ":", __VA_ARGS__) #define debugv(v) do {cout<< #v <<" : {"; for(int izxc=0;izxc > read() { int n;cin>>n;vector a(n);for(int &x:a) {cin>>x;} return {n,a}; } string f(string t) { int n=t.size(); int fa=0; while(fa>t; while(t--) { int n;cin>>n; string s;cin>>s; vector moms; for(int i=0;i=n-1 || s[i]!=s[i+1]) moms.app(i); if(i>=n-2 || s[i+1]!=s[i+2]) moms.app(i); if(i>=n-3 || s[i+2]!=s[i+3]) moms.app(i); } moms.app(n); sort(all(moms));moms.erase(unique(all(moms)),moms.end()); if(moms.size()>40) moms.resize(40); string res;for(int i=0;i=l) { string t=s; for(int i=l;i