a = input() b = input() c = b.rfind(a) if c==-1: print("Not Found") else: print("index = {:d}".format(c))