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