Ureckon is underway and there are a huge number of coordinators. There are number of tasks to be done numbered . However, they need to be assigned to the many coordinators.There are 3 coordinators who are hardworking and they have the maximum amount of responsibility. The three coordinators are : - Soumyadip, Tathagatha & Sangram. Soumyadip can only be assigned the tasks which are quirky numbers. Quirky numbers are positive integers which can be divided by the ID a or b or c. The ID a or b or c are the ID of the three coordinators respectively.The event convenor wants to know the task assigned to any of the three coordinators. Help him find the task number assigned.
The 1st line contains , the number of testcases. lines continue.
Each line of the testcase contains four integers .
Print the task number.
It's guaranteed that the result will be in range