#include<iostream>
using namespace std;
typedef struct St
{
int data;
Node * next;
}Node;
Node* Create()
{
Node* q= (Node*)malloc(sizeof(Node));
int x;
Bool circle = True;
while(circle)
{
cin>>x;
if(x != 0)
{
Node* p = (Node*)malloc(sizeof(Node));
p->data = x;
p->data = x;
q->next =p;
q=p;
}
else
{
circle = False;
}
}
p->next = NULL;
return head;
}
int length(Node* head)
{
Node * p = head;
int x = 0;
while(p->next != NULL)
{
x++;
p = p->next;
}
return x;
}
void Print(Node* head)
{
Node * p =head->Next;
while(NULL != p)
{
cout<<p->data;
p = p->next;
}
}