import math T = int(input()) for t in range(T): a,b,c = map(int, input().split(" ")) print(math.lcm(a, b, c))