410059: GYM103934 G Mmoohhaammeedd
Description
Egyptian names can be confusing sometimes. For instance, in a classroom, we may have students named Mohamed, Muhammad, Mohammed, Mohammad and Mohamad. While any of them is upset when people write his name wrong, no one suffers more than Mmoohhaammeedd.
Cursed by his parents that wanted a special name for him, Mmoohhaammeedd was bullied by his classmates throughout his life. Now, he asks your help to, finally, plan his revenge.
Mmoohhaammeedd got the attendance list of his school. Now, he will make a new one, changing the name of each of his classmates in the following way: Mmoohhaammeedd will duplicate each letter whose neighboring letters are different from it. In this way, "eman" turns into "eemmaann", "hasssan" turns into "hhaasssaann", "alaa" turns into "aallaa" and "mmoohhaammeedd" remains the same.
Given the name of one of Mmoohhaammeedd's classmates, print how he should write it in the attendance list.
InputThe first line contains an integer $$$n$$$ ($$$1 \leq n \leq 100$$$), the number of testcases, and it is followed by $$$n$$$ lines containing the names. Each name has at least one and most 100 characters, and consists of lowercase latin letters.
OutputThe output consists of $$$n$$$ lines, each one containing a name after the transformation of Mmoohhaammeedd.
ExamplesInput4 aba aabbaa aaaa aabaaOutput
aabbaa aabbaa aaaa aabbaaInput
4 eman hasssan alaa mmoohhaammeeddOutput
eemmaann hhaasssaann aallaa mmoohhaammeedd