It is holi festival, festival of colors. Devu is having fun playing holi and is throwing balloons with his girlfriend Glynis. Police saw this mischief and tried arresting his girlfriend, Devu being a mathematician asked police not to arrest his girlfriend and instead torture him with brain teaser. Devu was a young engineering fellow and he did not knew that policeman was equally good in mathematics, policeman gave Devu a problem which is as follows:
Let
Your aim is to answer
Can you help devu and his girlfriend rescue from modern police.
Input Format
You are given which is the number of queries to solve.
Each Query consist of 5 space separated integers
Constraints
Note The output to should be .
Output Format
Output contains exactly lines. line containing the answer for the query.
Sample Input
1
2 1 2 2 15
Sample Output
1
Explanation
so answer is