#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;
    if(scanf("%d",&n)!=1 || n<=0 || n>100)
    {
        printf("Invalid input");
        return 0;
    }
    struct Node*head=NULL,*temp=NULL,*last=NUlL;
    for(int i=0;i<n;I++)
    {
        int value;
        if(sacnf("%d",&value)!=1)
        {
            printf("Invalid input");
            return 0;
        }
        struct Node* newNode=createNode(value);
        if(head==NULL){
            head=newNode;
            last=newNode;
        }
        else
        {
            last->next=newNode;
            last=newNode;
        }
    }
    last->next=head;
    temp=head;
    int index=0;
    do
    {
        if(index%2==0)
        {
            temp->data+=10;
        }
        temp=temp->next;
        index++;
    }
    while(temp!=head);
    temp=head;
    do
    {
        printf("%d",temp->next);
        temp=temp->next;
    }
    while(temp!=head);
    return 0;
}