def contains_three(n : Int32) : Bool num = n while num > 0 return true if num % 10 == 3 num //= 10 end false end a, b = read_line.split.map(&.to_i) (a..b).each do |i| if i % 3 == 0 || contains_three(i) puts i end end