import std.algorithm, std.array, std.container, std.range, std.bitmanip; import std.numeric, std.math, std.bigint, std.random, core.bitop; import std.string, std.regex, std.conv, std.stdio, std.typecons; void main() { auto rd = readln.split.map!(to!int); auto a = rd[0], b = rd[1]; foreach (i; a..b+1) if (i % 3 == 0 || include3(i)) writeln(i); } bool include3(int n) { for (; n > 0; n /= 10) if (n % 10 == 3) return true; return false; }