Redundancy in this world is pointless. Let's get rid of all redundancy. For example, AAABB is redundant — why not just write AB? Given a string, collapse every run of consecutive identical letters into a single letter.
The first line contains an integer, the number of data sets that follow. Each of the following lines is one data set: a single string whose length is less than 100 and that contains only uppercase letters.
For each string, print the deduped string on its own line.