#include<stdio.h>
#include<stdlib.h>
struct node
{
    int data;
    struct node *next;
};
int main()
{
    int i;
    struct node *start=NULL;
    struct node *current=NULL;
    struct node *temp=NULL;
    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));
        scanf("%s", temp->data);
        temp->next = NULL;
        current->next = temp;
        current = temp;
    }
    current=start;
    while(current!=NULL)
    {
        printf("%d ",current->data);
        current=current->next;
    }
}