


The first line contains an integer T which denotes the number of test cases to be run.
The first and only line of each testcase contains a single string denoting the path .
For each test case, print a string representing a simplified path to the resulting file or directory.
You are not required to print anything explicitly. It has already been taken care of. Just implement the given function.
1 <= T <= 100
0 <= N <= 10^5
Where N is the length of the input path.
Time Limit : 1 sec
a). If it is a dot then continue.
b). If it is double dot then pop the directory from the stack.
c). Else push into the stack.
Count of Subsequences with Given Sum
Optimal Line Arrangement
Distinct Integers After Zero Removal
Maximize Partition Value
Maximum Value Path in a Graph