for a in range(10): for b in range(10): for c in range(10): print(''.join(map(str, (a, b, c)))) if input() == 'locked': pass else: break