(0..999).to_a.shuffle.each do puts "%03d" % (rand 1000) break if gets[0] == "u" end