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

#include "task_node.h"



struct task_node *pq_insert(struct task_node *head, char *name, int priority) {
    // TODO: implement this function
    (void) name;
    (void) priority;
    return head;
}

struct task_node *pq_pop(struct task_node *head, char *name_out, int *priority_out) {
    // TODO: implement this function
    name_out[0] = '\0';
    *priority_out = 0;
    return head;
}


int main(void) {
    struct task_node *head = NULL;
    char name[50];
    int pri;
    while (scanf("%49s %d", name, &pri) == 2) { head = pq_insert(head, name, pri); }
    char name_out[50];
    int priority_out;
    head = pq_pop(head, name_out, &priority_out);
    printf("Popped: %s %d\n", name_out, priority_out);
    while (head != NULL) { head = pq_pop(head, name_out, &priority_out); }
    return 0;
}
