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

struct Pilha {
    int topo;
    char **proxElemento;
};

void criaPilha (struct Pilha *p){
    p->topo = -1;
    p->proxElemento = malloc(10);
}

void insereItem (struct Pilha *p, char * nome) {
    p->topo++;
    p->proxElemento[p->topo] = malloc(31);
    strcpy(p->proxElemento[p->topo], nome);
}

void imprimir(struct Pilha *p) {
    printf("%s \n", p->proxElemento[p->topo]);
}

int main() {
    char nome[31];
    struct Pilha pilhaLivros;

    scanf("%s", nome);

    criaPilha(&pilhaLivros);
    insereItem(&pilhaLivros, nome);
    imprimir(&pilhaLivros);
    return 0;
}