#include <iostream>
#include <new>
using namespace std;
 
struct List{
    int Data;
    List *Next;
};
void ShowList(List *node){
    cout << "List = ";
    while(node){ 
        cout << node->Data << ", ";
        node = node->Next;
    }
}
inline List* NewList(int data){
    return new List{data, NULL};
}
void AppenList(List* node, int data) {
    while(node->Next) {
        node = node->Next;
    } node->Next = NewList(data);
}
int main() {
    List *head = NewList(-1);
    AppenList(head, 3);
    AppenList(head, 2);
    AppenList(head, 1);

    ShowList(head);
    return 0;
}