T = 10
for tc in range(1, T + 1):
    N, pw_s = input().split()
    N = int(N)
    while True:
        keepGoing = 0
        idx = 0
        while idx < len(pw_s) - 1:
            if pw_s[idx] == pw_s[idx + 1]:
                pw_s = pw_s[0:idx] + pw_s[idx + 2:]
                keepGoing += 1
            idx += 1
        if keepGoing == 0:
            break
    print(f'#{tc} {pw_s}')

e7e370a0353a7ff08f33deb3193df8c1c8fe0fd4
<mask token>

<mask token>
for tc in range(1, T + 1):
    N, pw_s = input().split()
    N = int(N)
    while True:
        keepGoing = 0
        idx = 0
        while idx < len(pw_s) - 1:
            if pw_s[idx] == pw_s[idx + 1]:
                pw_s = pw_s[0:idx] + pw_s[idx + 2:]
                keepGoing += 1
            idx += 1
        if keepGoing == 0:
            break
    print(f'#{tc} {pw_s}')

T = 10
for tc in range(1, T + 1):
    N, pw_s = input().split()
    N = int(N)
    while True:
        keepGoing = 0
        idx = 0
        while idx < len(pw_s) - 1:
            if pw_s[idx] == pw_s[idx + 1]:
                pw_s = pw_s[0:idx] + pw_s[idx + 2:]
                keepGoing += 1
            idx += 1
        if keepGoing == 0:
            break
    print(f'#{tc} {pw_s}')
