a, b = gets.split.map(&:to_i) (a..b).each do |i| if i % 3 == 0 puts i end end