#include "bits/stdc++.h" #define int long long using namespace std; using ll = long long; using P = pair; const ll INF = (1LL << 61); ll mod = 1000000007; signed main() { ios::sync_with_stdio(false); cin.tie(0); int N, M; cin >> N >> M; vectorX(N), Y(M); for (int i = 0; i < N; i++)cin >> X[i]; for (int i = 0; i < M; i++)cin >> Y[i]; sort(Y.begin(), Y.end()); for (int i = 0; i < N; i++) { int idx = lower_bound(Y.begin(), Y.end(), X[i]) - Y.begin(); if (idx == M)cout << "Infinity" << endl; else cout << Y[idx] - X[i] << endl; } return 0; }