#include <stdio.h>
#include <stdlib.h>

struct Node{
    int data;
    struct Node*next;
};

struct Node*head=NULL;
  void InsertAtEnd(int value){
      struct Node*newnode = (struct Node*) malloc(sizeof(struct Node));
      newNode->data = value;
      newNode->next = NULL;
      
      if(head == NULL){
          head = newNode;
          return;
      }
      struct Node*temp = head;
      while(temp!=NULL){
          temp = temp->next;
      }
      temp->next = newNode;
  }
  
  int main(){
      int n,value;
      scanf("%d", &n);
      
      if(n<0){
          printf("Invlid input");
          return 0;
      }
      for (int i=0;i<n;i++){
          int value;
          scanf("%d", &value);
          InsertAtEnd(value);
      }
      display();
      return 0;

  }