#include <stdio.h> 
main() { 
	char a[256],b[256],*x,*y;
	while ( gets(&a) && gets(&b) ) {
		printf("%s\t%s\t",a,b);
		x=a; y=b;
                while(*y)*x-*y++?0:x++;
		if (*x!='\0') 
			printf("false (%s)\n",x);
		else
			printf("true\n");
	}
 }