#include<stdio.h>
#include<stdlib.h>

struct Node{
    int data;
    struct Node* next;
    
};
struct Node* createNode (int a){
    struct Node* n=(struct Node*)malloc(sizeof(struct Node));
    n->data=a;
    n->next=NULL;
    return n;
}
void insertAtEnd(struct Node** head,int a){
    struct Node* newnode=createNode(a);
    if(*head==NULL){
        *head = newnode;
        return ;
    }
    struct Node*temp=*head;
    while(temp->next!=NULL){
        temp=temp->next;
    }
    temp->next=newnode;
}

void display(struct Node* head){
    struct Node* temp=head;
    while(temp!=NULL){
        printf("%d->",temp->data);
        temp=temp->next;
    }
}

int main(){
    struct Node* head=NULL;
    insertAtEnd(&head,hello);
    insertAtEnd(&head,world);
    insertAtEnd(&head,i am);
    insertAtEnd(&head,there);
    insertAtEnd(&head,For u);
    display(head);
    return 0;
}