def process_string(s):
    stack = []
    for char in s:
        while stack and abs(ord(stack[-1]) - ord(char)) == 1:
            if stack[-1] < char:
                break
            else:
                stack.pop()
        else:
            stack.append(char)
    return ''.join(stack)

def solve():
    n = int(input())
    s = input().strip()
    result = process_string(s)
    print(result)


t = int(input())
results = []
for _ in range(t):
    solve()