#include<stdio.h>
#include<stdlib.h>
#include<ctype.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* insert(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 updataeven(struct Node* head){
    if(head == NULL) return;
    struct Node* current = head;
    int index=0;
    do{
        if(index%2==0){
            current->data +=10;
            *current=*current->data;
            index++;
         }
    }while(current != head);
    
}

void printlist(struct Node* head){
    if(head == NULL) return;
    struct Node* current = head;
    do{
        printf("%d",current->data);
        current=current->next;
    }while(current != head);
    printf("\n");
}



int main() 
{
    int k;
    if (scanf("%d", &k) != 1 || k < 4 || k > 12) {
        printf("Invalid input\n");
        return 0;
    }
     struct Node* head = NULL;
    for (int i = 0; i < k; i++) 
    {
        int value;
        if (scanf("%d", &value[i]) != 1) {
            printf("Invalid input\n");
            return 0;
        }
        head=insert(head,value);
    }
    updateeven(head);
    printlist(head);
    return 0;
}