var num, c: integer;
begin
c := 0;
while not eoln do begin
read(num);
c := c + 1;
if c mod 3 <> 0 then writeln(num);
end;
end.
var num, c: integer;
begin
c := 0;
while not eoln do begin
read(num);
c := c + 1;
if c mod 3 <> 0 then writeln(num);
end;
end.