#include <stdio.h>
#include <string.h>

int main()
 {
    char secret1[100];
    char secret2[100];
    while (scanf("%s %s", secret1, secret2) == 2)
    {
        if (strcmp(secret1, secret2) == 0)
            printf("same\n");
        else
            printf("different\n");
    }

    return 0;
}