var
i :integer;
a : array [1..6] of integer;
begin
for i:=1 to 6 do
readln(a[i]);
for i:= 1 to 6 do
if a[i] mod 10 = 5 then
write(a[i], ' ');
end.
a = [int(input()) for i in range(6)]
[print(i) if str(i)[-1] == "5 else int() for i in range(len(a))]
var
i :integer;
a : array [1..6] of integer;
begin
for i:=1 to 6 do
readln(a[i]);
for i:= 1 to 6 do
if a[i] mod 10 = 5 then
write(a[i], ' ');
end.
a = [int(input()) for i in range(6)]
[print(i) if str(i)[-1] == "5 else int() for i in range(len(a))]