#include <stdio.h>
#include <stdlib.h>
#include<string.h>7
struct node {
    char data[100];
    struct node *next;
};

int main() {
    int n, i;
    struct node *start = NULL;
    struct node *temp = NULL;
    struct node *current = NULL;
   
    scanf("%d", &n);
    start = (struct node *)malloc(sizeof(struct node));
    
    scanf("%s", start->data);
    start->next = NULL;
    current = start;
    for (i = 2; i <= n; i++) {
        temp = (struct node *)malloc(sizeof(struct node));
        printf("%d ", i);
        scanf("%s", temp->data);
        temp->next = NULL;
        current->next = temp;
        current = temp;
    }
    
    current = start;
    while (current != NULL) {
        printf("%s ", current->data);
        current = current->next;
    }

    return 0;
}