题目描述
Slugtera is a town where three types of people lives which are criminals , terminator and life saver . Criminals are represented by o and terminator are represented by x and saver are represented by * . So in this story x function is to kill all o but however if * comes between o and x then x is not able to kill o .
Input :
The first line contains T - number of test cases . Each of next T lines contain a string S.
Output :
For each test case you need to print the result after reduction .
Constraints :
1 ≤ T ≤ 50
1 ≤ |S| ≤ 100, where |S| denotes the length of string S.
Note : String will contain only small characters.
SAMPLE INPUT
3
oxox
xoooooooooxo
oooooooooxooo**xxxxooooo
SAMPLE OUTPUT
xx
xoooooooox
ooooooooox**xxxx
Explanation
In the first case : o is terminated by x.
In the second case : many O's are saved because of * pair.
In the third case : The starting O's are saved because * is between o and x.
输入格式
见题面
输出格式
见题面