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

#include "catalogue.h"



void catalogue_add(struct catalogue *cat, struct book b) {
    // TODO: implement this function
    (void) cat;
    (void) b;
}

void catalogue_remove(struct catalogue *cat, int index) {
    // TODO: implement this function
    (void) cat;
    (void) index;
}


int main(void) {
    struct catalogue cat;
    cat.books = NULL;
    cat.num_books = 0;
    cat.capacity = 0;
    char tok[100];
    while (scanf("%99s", tok) == 1) {
        if (strcmp(tok, "REMOVE") == 0) {
            int index;
            if (scanf("%d", &index) == 1) { catalogue_remove(&cat, index); }
            break;
        }
        int year;
        if (scanf("%d", &year) != 1) { break; }
        struct book b;
        strcpy(b.title, tok);
        b.year = year;
        catalogue_add(&cat, b);
    }
    printf("%d book(s) remaining", cat.num_books);
    if (cat.num_books > 0) {
        printf(":");
        for (int k = 0; k < cat.num_books; k++) { printf(" %s", cat.books[k].title); }
    }
    printf("\n");
    free(cat.books);
    return 0;
}
