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

#include "node.h"



struct node *reverse_list(struct node *head) {
    // TODO: implement this function
    return head;
}


int main(void) {
    int n;
    if (scanf("%d", &n) != 1) { n = 0; }
    int arr[1000];
    for (int i = 0; i < n; i++) { scanf("%d", &arr[i]); }
    struct node *head = build_list(arr, n);
    struct node *new_head = reverse_list(head);
    print_list(new_head);
    free_list(new_head);
    return 0;
}
