#include <stdio.h>
#include<string.h>
int main(void){
char gan[1024];
char gangan[1024];
while(fgets(gan,sizeof(gan),stdin)!=NULL){
if(gan[strlen(gan)-1]=='\n')gan[strlen(gan)-1]='\0';
break;
}
while(fgets(gangan,sizeof(gangan),stdin)!=NULL){
if(gangan[strlen(gangan)-1]=='\n')gangan[strlen(gangan)-1]='\0';
break;
}
printf("%s and %s sitting in the tree",gan,gangan);
}