Run ID:86598
提交时间:2024-07-26 22:46:40
n=int(input()) for i in range(n): a,b,c=map(int,input().split()) x=1000 found=False while x<=9999: if x%a==0 and (x+1)%b==0 and (x+2)%c==0: print(x) found=True break x+=1 if found==False: print("Impossible")