// editor3
#include <stdio.h>
#include <stdlib.h>
struct Node{
    int data;
    struct Node* next;
};

int main(){
    int n;
    if(scanf("%d",&n) !=1){
        printf("Invalid input");
        return 0;
    }
    if(n<1){
        printf("Empty");
        return 0;
    }
    struct Node *head = NULL, *tail = NULL;
    for(int i = 0;i < n; i++) {
        int value;
        if(scanf("%d",&value) !=1){
            printf("Invalid input");
            return 0;
        }
        struct Node* newNode = (struct Node*)malloc(sizeof(struct Node));
        newNode->data = value;
        newNode->next = NULL;
        if(head == NULL){
            head = tail = newNode;
        }else{
            tail->next = newNode;
            tail = newNode;
        }
    }
    struct Node *curr = head, *prev = NULL;
    while(curr !=NULL){
        if(curr->data % 2 !=0) {
            head = curr->next;
            free(curr);
            curr = head;
        }
        }else{
            prev->next = curr->next;
            free(curr);
            curr = prev->next;
        }
    }else{    
            prev = curr;
            curr = curr->next;
        }
    }
    if (head == NULL) {
        printf("Empty");
        return 0;
    }
    curr = head;
      while(curr!=NULL) {
        printf("%d",curr=>data);
        if(curr->next !=NULL) {
            printf(" ");
        }
        curr = curr->next;
    }
    
    return 0;
}