f=->{gets.gsub(/\d+/){|m|"%03d"%m}};puts f[]