// editor5
#include<stdio.h>
struct book{
    int id;
    char title[50];
    char author[50];
};
int main(){
    int n;
    scanf("%d",&n);
    if(n<0){
        printf("Invalid input");
        return 0;
    }
    struct book arr[n];
    for(int i=0;i<n;i++){
        scanf("%d %s %s\n",arr[i].title,arr[i].author);
        printf("%s\n",arr[i].title);
    
    return 0;
    }