#include
using namespace std;
class node{
int data;
node *next;
};
void insertAtHead(node*&head,int data){
node*n=new node(data);
n->next=head;
head=n;
}
void print(){
node *temp=head;
while(temp!=null){
cout<data<<" "<<endl;
temp=temp->next;
}
}
int main(){
node *head=NULL;
insertAtHead(head,3);
insertAtHead(head,4);
insertAtHead(head,5);
print();
return 0;
}