def is_reverse(word1,word2):
    if len(word1) != len(word2):
        return False
    i = 0
    j = len(word2) - 1
    while j >= 0:
        if word1[i] != word2[j]:
            return False
        i = i + 1
        j = j - 1
    return True

a = input('enter word1\n')
b = input('enter word2\n')
print(is_reverse(a,b))

