var
a, b, i, x : integer;
begin
read (a, b, x);
for i := a to b do if i mod 10 = x then writeln (i);
end.
var
a, b, i, x : integer;
begin
read (a, b, x);
for i := a to b do if i mod 10 = x then writeln (i);
end.