"000".upto("999"){|str| puts str $>.flush gets res exit if res.start_with? ?u }