#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;
}
void printList(struct Node* head, int n) 
{
    if (head == NULL) return;

    struct Node* temp = head;
    int count = 0;

    do 
    {
        printf("%d ", temp->data);
        temp = temp->next;
        count++;
    } while (temp != head && count < n);

    printf("\n");
}

int main() {
    int n;
    if (scanf("%d", &n) != 1) {
        printf("Invalid input\n");
        return 0;
    }

    if (n < 1 || n > 100) {
        printf("Invalid input\n");
        return 0;
    }

    struct Node* head = NULL;
    struct Node* tail = NULL;

    // Read numbers and create circular linked list
    for (int i = 0; i < n; i++) {
        int value;
        if (scanf("%d", &value) != 1) {
            printf("Invalid input\n");
            return 0;
        }

        struct Node* newNode = createNode(value);

        if (head == NULL) {
            head = newNode;
            tail = newNode;
        } else {
            tail->next = newNode;
            tail = newNode;
        }
    }
    // Make the list circular
    tail->next = head;

    // Traverse and update even-indexed nodes (+10)
    struct Node* current = head;
    int index = 0;
    do {
        if (index % 2 == 0) {
            current->data += 10;
        }
        current = current->next;
        index++;
    } while (current != head);

    // Print updated list
    printList(head, n);

    return 0;
}