Given 6 numbers a,b,c,d,e,f. Find the last digit of (ab)*(cd)*(ef).
The first line of the test case contains an integer T, denoting number of test cases. Following T lines contains six space separated integers a, b, c, d, e and f.
For each of the test case print the required answer in separate lines.
1 <= T <= 3.4*103
1 <= a,b,c,d,e,f <= 109
3 66 6 41 7 53
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.