// editor2
#include<stdio.h>
#define MAX_BOOKS 10
#define MAX_LEN 51
struct Book{
    int id;
    char title[MAX_LEN];
    char author[MAX_LEN];
};
int main(){
    int n;
    if(scanf("%d",&n)!=1 || n<1 || n<MAX_BOOKS){
        printf("Invalid input");
        return 0;
    }
    struct Books books[MAX_BOOKS];
    for(int i=0;i<n;i++){
        if(scanf("%d %50s %50s",&books[i].id,books[i].title,books[i].author)!=3){
            printf("Invalid input");
            return 0;
        }
    }
    for(int i=0;i<n;i++){
        printf("%s\n",books[i].title);
    }
    return 0;
}