n =gets.split a =[*n[0]..n[1]] a.each{|i| p i if i % 3 == 0 ||i.to_s.include?("3")}