#include using namespace std; int n, m; int x[1000], y[1000]; int main() { cin >> n >> m; for (int i = 0; i < n; i++) cin >> x[i]; for (int i = 0; i < m; i++) cin >> y[i]; sort(y, y + m); for (int i = 0; i < n; i++) { auto itr = lower_bound(y, y + m, x[i]); if (itr == y + m) cout << "Infinity" << endl; else cout << *itr - x[i] << endl; } }