Problem hidden
This problem was hidden by Editorial Board member probably because it has incorrect language version or invalid test data, or description of the problem is not clear.

## CONTFRAC - Continued fraction

Given a continued fraction 'a0 a1 a2...an' with ai<=32767 calculate the representing rational number 'p/q' with p and q being coprime. Otherwise given the rational number 'p/q' with 0<=p<=32767, 0<q<=32767 calculate the representing continued fraction 'a0 a1 a2...an' with an>1 if n>0. There are no negative numbers.

### Input

In the first line the number of test cases t<100. Then t lines with either a continued fraction or a rational number. No line is longer then 80 bytes without the linefeed.

### Output

t lines with either a representing rational number or continued fraction.

### Example

```Input:
441/1521 2 3 49/42 3 7

Output:
0 3 1 2 2 2 243/302 451/22
```

 Added by: HWK Date: 2011-06-24 Time limit: 0.100s Source limit: 50000B Memory limit: 1536MB Cluster: Cube (Intel G860) Languages: All except: SCM qobi