A = input() print('?', A+A) while 1: t,s = input().split() if t == '!': exit() print('?', s[::-1])