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