Run ID:72986

提交时间:2024-05-15 10:00:37

n = int(input()) for _ in range(n): a,b,c = list(map(int,input().split())) for x in range(1000,9999+1): if x%a ==0 and (x+1)%b==0 and (x+2)%c ==0: print(x) break else: print("Impossible")