#include<stdio.h>
#include<stdlib.h>
typedef struct circle{
    int data;
    struct circle*next;
}odd;
typedef struct circle2{
    int data;
    struct circle2*next;
}even;
odd*head=NULL,*tail=NULL;
even*head2=NULL,*tail2=NULL;
void oddn(int num){
    odd *newNode=(odd*)malloc(sizeof(odd));
    newNode->data=num;
    newNode->next=NULL;
    if(head==NULL){
        head=newNode;
        tail=newNode;
    }else{
        tail->next=newNode;
        tail=newNode;
    }
    tail->next;
}
void evenn(int num){
    even*newNode=(even*)malloc(sizeof(even));
    newNode->data=num;
    newNode->next=NULL;
    if(head2==NULL){
        head2=newNode;
        tail2=newNode;
    }else{
        tail2->next=newNode;
        tail2=newNode;
    }
    tail2->next;
}
void display(){
    odd*temp=head;
    even*temp2=head2;
    do{
        printf("%d ",temp2->data);
        temp2=temp2->next;
    }while(temp2!=head2);
    printf("\n");
}
do
{
        printf("%d ",temp->data);
        temp=temp->next;
    }while(temp!=head);
   }
int main(){
       int n,data;
       scanf("%d",&n);
       if(n<=0){
           printf("Invalid input");
           return 0;
       }
       if(data%2==0){
           evenn(data);
       }
       else{
           oddn(data);
       }
       display;
       return 0;
}