use std::io::stdin; pub fn main() { let (a, b): (usize, usize) = { let mut b = String::new(); let _ = stdin().read_line(&mut b); let mut v = b.split_whitespace().flat_map(|x| x.parse()); (v.next().unwrap(), v.next().unwrap()) }; for i in a..b + 1 { if i % 3 == 0 || i.to_string().contains("3") { println!("{}", i); } } }