using System; using System.Collections.Generic; using static System.Console; using System.Linq; class yuki320 { static int NN => int.Parse(ReadLine()); static int[] NList => ReadLine().Split().Select(int.Parse).ToArray(); static int[][] NArr(int n) => Enumerable.Repeat(0, n).Select(_ => NList).ToArray(); static void Main() { var c = NList; var x = NList; var y = NList; Array.Sort(y); var res = new string[x.Length]; for (var i = 0; i < x.Length; ++i) { var pos = Pos(x[i], y); if (pos == y.Length) res[i] = "Infinity"; else res[i] = (y[pos] - x[i]).ToString(); } WriteLine(string.Join("\n", res)); } static int Pos(int val, int[] list) { if (val > list[list.Length - 1]) return list.Length; var ng = -1; var ok = list.Length - 1; while (ok - ng > 1) { var center = (ok + ng) / 2; if (val <= list[center]) ok = center; else ng = center; } return ok; } }