from bisect import bisect_left def main(): _, _ = map(int, input().split()) x = list(map(int, input().split())) y = list(map(int, input().split())) y.sort() for xx in x: try: print(y[bisect_left(y, xx)] - xx) except IndexError: print("Infinity") if __name__ == "__main__": main()