use v6; my ($A, $B) = get().split(' '); my $ans = ''; for $A..$B { $ans ~= "$_\n" if ($_ % 3 == 0) || Str($_).index('3').defined; } say $ans;