시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 128 MB17471304122275.854%

문제

Redundancy in this world is pointless. Let’s get rid of all redundancy. For example AAABB is redundant. Why not just use AB? Given a string, remove all consecutive letters that are the same.

입력

The first line in the data file is an integer that represents the number of data sets to follow. Each data set is a single string. The length of the string is less than 100. Each string only contains uppercase alphabetical letters.

출력

Print the deduped string.

예제 입력 1

3
ABBBBAACC
AAAAA
ABC

예제 출력 1

ABAC
A
ABC