#include <stdlib.h>
#include <stdio.h>

struct NAME_1
{
    int data;
    struct NAME_1* next;
};

struct NAME_1* head; //an pointer to headnode

void Insert(int n){
    struct NAME_1* temp = (NAME_1*)malloc(sizeof(struct NAME_1));
    temp->data = n;
    temp->next = head;
    head = temp;
}   

void Print(){
    struct NAME_1* temp = head;
    while (temp != NULL)
    {
        printf("%d ", temp->data);
        temp = temp->next;
    }
    printf("\n");
}

int main(){
    head = NULL;  //empty linked list
    int m, n;
    printf("please input the num of linked list:");
    scanf("%d", &m);
    for (int i = 0; i < m; i++)
    {
        printf("input data:");
        scanf("%d", &n);
        Insert(n);
    }
    Print();
    return 0;
}