import sys ans = 1 res = 1 for cnt in xrange(11): print "? %d" % (ans | 1 << (11 - cnt)) sys.stdout.flush() res = int(raw_input()) if res == 1: ans |= 1 << (11 - cnt) print "! %d" % res sys.stdout.flush()