#include <cstdio>
#include <vector>
#include <cmath>
#include <iostream>
#include <string.h>
using namespace std;
struct ListNode
{
int m_nKey;
ListNode* m_pNext;
};
void NewSet(ListNode *&Head, int n)
{
ListNode *t;
t = new ListNode();
t->m_pNext = Head;
t->m_nKey = n;
Head = t;
}
void Convert(ListNode *&Head, ListNode *&Temp, ListNode *&Last, ListNode *&End)
{
if(Temp == End)
return ;
ListNode *P = Temp->m_pNext;
Temp->m_pNext = Last;
Head = Temp;
Convert(Head,P,Temp,End);
}
void OutPut(ListNode *P, ListNode *End)
{
if(P->m_pNext == End)
{
cout << P->m_nKey << endl;
return ;
}
cout << P->m_nKey << " ";
OutPut(P->m_pNext,End);
}
int main()
{
ListNode *End = new ListNode();
ListNode *Head = End;
NewSet(Head,8);
N