import bisect n, m = map(int, input().split()) x = list(map(int, input().split())) y = list(map(int, input().split())) y.sort() for xi in x: pos = bisect.bisect_right(y, xi) if pos < m: print(y[pos] - xi) else: print("Infinity")