#include<stdio.h>
#include<stdlib.h>
typedef struct Node
{
     char *name;
     struct Node* tail;
};
void printlist(struct node *p)
{
    while(p!=NULL)
    {
        printf("%s ",p->name);
        p=p->tail;
    }
}
int main()
{
    struct node *head;
    struct node *one=NULL;
    struct node *two=NULL;
    struct node *three=NULL;
    one=malloc(sizeof(struct node));
    two=malloc(sizeof(struct node));
    three=malloc(sizeof(struct node));
    one->name="Meher";
    two->name="Govindh";
    three->name="Pavni";
    one->tail=two;
    two->tail=three;
    three->tail=NULL;
    head=one;
    printlist(head);
    return 0;
}