#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 *nd=(node)malloc(Sizeof(node));
    nd->data=n;
    nd->next=NULL;
    if(head==NULL)
    {
        head=tail=nd;
    }
    else
    {
        tail->next=nd;
        tail=nd;
    }
}

void print()
{
    node *temp=head;
    int small=temp->data;
    while(temp!=NULL)
    {
        if(temp->data<small)
        {
            small=temp->data;
        }
        printf("%d",temp->data);
        temp=temp->next;
    }
}