fraction-addition

Problem Statement:
Given a simple arithmetic expression you need to find the result in 
least repersentable mixed format.
note:expression contains only addition and substraction.

Input format
first line of input contains the no of test cases T. following T test cases 
contains the expression.

Output format
output contains T line in which ith line each contains the result corrosponding to ith 
expression.

SAMPLE INPUT
5
1/2+2/3
-4/7+1
2+7/8
1/4-3/4
17/8-3/8

SAMPLE OUTPUT
1_1/6
3/7
2_7/8
-1/2
1_3/4

Source: hackerearth | Difficulty: UNKNOWN_DIFFICULTY


Solutions: