#include #define rep(i, n) for (int i = 0; i < (n); ++i) using std::cin; using std::cout; using std::vector; int main() { int n, m; cin >> n >> m; vector x(n), y(m); rep(i, n) cin >> x[i]; rep(i, m) cin >> y[i]; rep(i, n) { bool ok = true; rep(j, m) { if (x[i] < y[j]) { ok = false; cout << y[j] - x[i] << '\n'; break; } } if (ok) puts("Infinity"); } return 0; }