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