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