G. A+B+C
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

Everybody knows the typical A+B problem, this one is much harder, instead of A+B it's going to be A+B+C, but with fractions.

Input

An integer T (1<=T<=$$$10{^3}$$$), the number of test cases T lines follow, each with 3 fraction numbers, each in the form $$$\frac{n}{d}$$$ (1<=n,d<=$$$10{^6}$$$)

Output

One line per test case, a single simplified fraction in the format $$$\frac{num}{den}$$$

Example
Input
2
1/2 1/3 1/4
3/2 1/2 2/2
Output
13/12
3/1