#include<stdio.h>
#include<stdlib.h>
#include<string.h>
struct node{
    int data;
    struct node*next;
};
struct node*createnode(int data){
    struct node *newnode = (struct node *)malloc(sizeof(struct node));
    newnode->data = data;
    newnode->next = NULL;
    return newnode;
}
struct node*insertend(struct node*head,int data){
    struct node*newnode=createnode(data);
    if(head==NULL){
        head=newnode;
        head->next=head;
        return head;
    }
    struct node*temp=head;
    while(temp->next!=head)
       temp=temp->next;
    temp->next=newnode;
    newnode->next=head;
    return head;
}
void updateevennodes(struct node*head){
    if(head==NULL){
        return;
        struct Node* current = head;
        int index=0;
        do{
            if (index %2 ==0)
            current->data+=10;
            current=current->next;
            index++;
        }
        while (current!=head);
    }
    voidprintlist(struct Node* head){
        if (head=NULL)
        return;
        structNode* current=head;
        do{
            printf("%d",current->data);
            current=current->next;
        }
        while (current !=head);
        printf("\n");
    }
    int main(){
        int n;
        if(scanf("%d",&n) !=1||n<1||n>100){
            printf("Invalid input\n");
            return 0;
        }
        struct Node* head =NULL;
        for (int i=0;i<n;i++){
            int value;
            if(scanf("%d",&value)!=1){
                int value;
                if(scanf("%d",&value)!=1){
                    printf("Invalid input\n");
                    return 0;
                }
                head=insertend(head,value);
            }
            updatesevennodes(head);
            printlist(head);
            return 0;
        }