inf = 10 ** 18 N, M = map(int, input().split()) X = list(map(int, input().split())) Y = list(map(int, input().split())) Y.sort() ans = [] for x in X: res = inf for y in Y: if x < y: res = y break if res == inf: print('Infinity') ######## else: print(res - x)