import sys preX = 0 ans = [0 for i in range(10)] sys.stdout.write(''.join(str(j) for j in ans) + '\n') sys.stdout.flush() a,b = raw_input().split() a = int(a) if a != 10: preX = a it = 0 ans[it] += 1 while True: sys.stdout.write(''.join(str(j) for j in ans) + '\n') sys.stdout.flush() x,res = raw_input().split() if int(x) == 10: break else: if int(x) > preX: it += 1 preX = x elif int(x) < preX: ans[it] -= 1 it += 1 else: ans[it] += 1