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

#include "edit_node.h"



struct edit_node *undo_push(struct edit_node *head, char *text) {
    // TODO: implement this function
    (void) text;
    return head;
}

struct edit_node *undo_pop(struct edit_node *head, char *current_out) {
    // TODO: implement this function
    current_out[0] = '\0';
    return head;
}


int main(void) {
    struct edit_node *head = NULL;
    int n;
    if (scanf("%d", &n) != 1) { n = 0; }
    int ch;
    while ((ch = getchar()) != '\n' && ch != EOF) { }
    for (int i = 0; i < n; i++) {
        char line[200];
        if (fgets(line, sizeof line, stdin) == NULL) { break; }
        line[strcspn(line, "\n")] = '\0';
        head = undo_push(head, line);
    }
    char current[200];
    head = undo_pop(head, current);
    printf("cur is now: %s\n", current);
    while (head != NULL) { head = undo_pop(head, current); }
    return 0;
}
