#include <bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
int main( ) {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
// genius_koder
int t;
cin>>t;
while(t--) {
int n;
cin>>n;
string s;
cin>>s;
string res="";
int curr = 0;
int prevLen = 0;
while(curr < n) {
res += s[curr];
++curr;
while(s[curr]!=res.back()) {
curr++;
}
++curr;
}
cout<<res<<endl;
}
return 0;
}
Missing numbers | Maximum sum |
13 Reasons Why | Friend's Relationship |
Health of a person | Divisibility |
A. Movement | Numbers in a matrix |
Sequences | Split houses |
Divisible | Three primes |
Coprimes | Cost of balloons |
One String No Trouble | Help Jarvis! |
Lift queries | Goki and his breakup |
Ali and Helping innocent people | Book of Potion making |
Duration | Birthday Party |
e-maze-in | Bricks Game |
Char Sum | Two Strings |
Anagrams | Prime Number |
Lexical Sorting Reloaded | 1514A - Perfectly Imperfect Array |