/*
TASK:BOOKS
LANG:C++
*/
#include<iostream>
using namespace std;
int main(){
    int N,K,ed,des,stot,hil,i;
    cin>>N;
    for(i=1;i<=N;i++){                                                   
                      cin>>K;
                      hil=K/1000;
                      stot=(K/100)%10;
                      des=(K/10)%10;
                      ed=K%10;}
                      if((ed+des+stot+hil)%2==0) cout<<K<<" ";
                      else cout<<K<<" ";
                      cout<<endl;
                      
                      
                               
    system("pause");
    return 0;
}
