#include<iostream>
using namespace std;
class Node{
public :
int data;
Node* next;
Node(int d)
{
data=d;
next=NULL;
}
};
void insert(Node*&head, int d)
{
if(head==NULL)
{
head=new Node(d);
return;
}
Node *n=new Node(d);
n->next=head;
head=n;
}
void print(Node*head)
{
while(head!=NULL)
{
cout<<head->data<<" -> ";
head=head->next;
}
}
int main()
{
Node*head=NULL;
insert(head, 32);
insert(head, 45);
insert(head, 26);
insert(head, 13);
insert(head, 70);
insert(head, 36);
insert(head, 42);
print(head);
}