#include<stdio.h>
#include<stdlib.h>

typedef struct circular
{
    int dat;
    struct circular *next;
}node;

node *head=NULL,*tail=NULL;

void create(int n)
{
    node *nd=(node*)malloc(sizeof(node));
    nd->data=n;
    nd->next=NULL;
    if(head==NULL)
    {
        head=tail=nd;
    }
    else
    {
        nd->next=head;
        head=nd;
        tail->next=head;
    }
}

void ins(int n)
{
    node *nd=(node*)malloc(Sizeof(node));
    nd->data=n;
    nd->next=head;
    head=nd;
    tail->next=head;
}

void print()
{
    node *temp=head;
    do
    {
        printf("%d ",temp->data);
        temp=temp->next;
    }
    while(temp!=head);
}

int main()
{
    int n,data,val;
    scanf("%d",&n);
    if(n<=0)
    {
        printf("Invalid input");
        return 0;
    }
    
}