import java.util.Scanner; import java.util.TreeSet; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int m = sc.nextInt(); int[] x = new int[n]; for (int i = 0; i < n; i++) { x[i] = sc.nextInt(); } TreeSet y = new TreeSet<>(); for (int i = 0; i < m; i++) { y.add(sc.nextInt()); } sc.close(); for (int i = 0; i < n; i++) { Integer a = y.higher(x[i]); if (a == null) { System.out.println("Infinity"); } else { System.out.println(a - x[i]); } } } }