#include <iostream>

using namespace std;

int main()
{
    int N,L;
    cout<<"Add meg a cseppkovek szamat!"<<endl;
    cin>>N;
    cout<<"Add meg Peter magassagat!"<<endl;
    cin>>L;
cout<<"Add meg a cseppkovek magassagat!"<<endl;

    int H[1000];
    for (int i=0; i<N; i++)
    cin>>H[i];

    for (int i=1; i<=N; i++)
        
        if (H[i-1]<=L)
            cout<<H[i-1]<<endl;
        else
            cout<<"-1"<<endl;


    return 0;
}