import sys def maxindex(x): return max(enumerate(x),key=lambda x:x[1])[0] def q(s): print s sys.stdout.flush() return int(raw_input().split()[0]) print"".join(`maxindex(i)`for i in[[q("{0:0>10}".format(j*(10**i)))for j in range(10)]for i in range(9,-1,-1)])