#include<stdio.h>
#include<stdlib.h>
typedef struct list
{
    int data;
    struct list *next;
}node;
node*head=NULL,*tail=NULL;
void create(int n)
{
    node *newnode=(node*)malloc(sizeof(node));
    newnode->data=n;
    newnode->next=NULL;
    if(head==NULL)
    {
        head=newnode;
        tail=newnode;
    }

else
  {
    tail->next=newnode;
    tail=newnode;
   }
}
void print()
{
    node *temp=head;
    while(temp!=NULL)
    {
        printf("%d ",temp->data);
        temp=temp->next;
    }
}
void del(int e)
{
    if(head==NULL)
    {
        printf("Node not found");
    }
    else
    {
        node *temp=head,*temp2=NULL,*ptr=NULL;
        while(temp!=NULL)
        {
            if(temp->data==e)
            {
                if(head->data==temp->data)
            {
                ptr=temp;
                head=head->next;
                free(temp);
                print();
                break;
            }
            temp2=temp;
            temp=temp->next;
        }
        if(ptr==NULL)
        {
            printf("Node not found");
        }
    }
}
int main()
{
    int n,data,dl;
    scanf("%d",&n);
    if(n<0)
    {
        printf("Invalid input");
        return 0;
    }