#include #include #include using namespace atcoder; using mint = modint998244353; using namespace std; #define rep(i,n) for (int i = 0; i < (n); ++i) #define Inf 10000000000000000 int main(){ int N,M; cin>>N>>M; vector a(N),b(M); rep(i,N)cin>>a[i]; rep(i,M)cin>>b[i]; sort(b.begin(),b.end()); rep(i,N){ long long ans = Inf; rep(j,M){ if(b[j] >= a[i]){ ans = b[j]; break; } } if(ans==Inf)cout<<"Infinity"<