#include<stdio.h>
#include<stdlib.h>
struct Node{
    int data;
    struct Node*next;
};
struct Node*createnode(int valuue){
 struct Node*n=(struct Node*)malloc (size of (struct Node));
 n->data=value;
 n->next=NULL;
 return newNode;
 }struct Node* insertAtPosition(struct Node*head,int value,int pos,int n){
     if(pos<1||pos>n+1){
         printf("Invalid input");
         exit(0);
     }
     struct Node*n=createNode(value);
     if(pos==1){
         n->next=head;
         return n;
     }
     struct Node*temp=head;
     for(int i=1;i<pos-1;i++){
         temp=temp->next;
     }
     n->next=temp->next;
     temp->next=newNode;
     return head;
 }
 void printList(struct Node*head){
     while(head!=NULL){
         printf("%d",head->next);
         head=head->next;
     }
 }
 int main(){
     int n;
     scanf("%d",&n);
     if(n<1||n>100){
         printf("Invalid input");
         return 0;
     }
     struct Node*head=NULL;
     struct Node*tail=NULL;
    for(int i=0;i<n;i++){
    int val;
    scanf("%d",&val);
    struct Node *n=createNode(val);
    if(head==NULL){
    head=n;
    tail=n;
    }else{
        tail->next=n;
        tail=n;
    }
}
int value,pos;
scanf("%d",&val);
scanf("%d",&pos);
head=ins
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
 }