#include <stdio.h>
#include <stdlib.h>
struct Node {
    int data;
    struct Node* next;
    struct Node* prev;
} 
struct Node* createNode(int value) {
    Node* newNode = (Node*)malloc(sizeof(Node));
    newNode->data = value;
    newNode->next = newdata->prev=NULL;
    return newNode;
}
int main(){
    int n;
    if(scanf("%d",&n)!=1||n<1||n>100){
        printf("Invalid input\n");
        return 0;
    }
    struct node* head=NULL;
    struct node* tail=NULL;
    for(int i=0;i<n;i++){
        int value;
        if(scanf("%d",&value)!=1){
            printf("Invalid input\n");
            return 0;
        }
        struct node* newnode=createnode(value);
        if(head==NULL){
            head=tail=newnode;
            head->next=head->prev=head;
        }
        else{
            newnode->prev=tail;
            newnode->next=head;
            tail->next=newnode;
            head->prev=newnode;
            tail=newnode;
        }
        
    }
    struct node* current=head;
    int index=0;
    do{
        if(index %2==0){
            current->data==10;
        }
        current=current->next;
        index++;
        
    }
    while(current!=head);
    current=head;
    do{
        printf("%s",current->data);
        current=current->next;
        if(current!=head)printf(" ");
        
    }
    while(current!=head);
    printf("\n");
    return 0;
}