t = int(input())
while t:
    n = int(input())
    s = input()
    st = []
    for i in range(n):
        flag = True
        while len(st):
            x = ord(st[-1])
            y = ord(s[i])
            if x + 1 == y:
                flag = False
                break
            if x == y + 1:
                st.pop()
            else:
                st.append(s[i])
                flag = False
                break
        if flag:
            st.append(s[i])
    print(''.join(st))
    t -= 1
