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