from collections import deque n, m = map(int,input().split()) x = list(map(int,input().split())) y = list(map(int,input().split())) z = x + y z.sort() s = [-1] * n g = [-1] * n for i in range(n + m): if z[i] in x: s[x.index(z[i])] = z[i] if z[i] in y: for j in range(n): if s[j] >= 0 and g[j] < 0: g[j] = z[i] for i in range(n): print(g[i] - s[i] if g[i] > 0 else 'Infinity')