#include <stdio.h>
#include <string.h>
int main()
{
	char ch1[100] = { 0 };
	char ch2[100] = { 0 };
	while (scanf("%s %s", ch1, ch2) != EOF)
	{
		if (strcmp(ch1, ch2) == 0)
		{
			printf("same\n");
		}
		else
			printf("different\n");
	}
	return 0;
}