var
i: Integer;
inp: String;
begin
readln(inp);
for i := 1 to length(inp)-1 do if inp[i] = inp[i+1] then Write(inp[i], inp[i]);
end.
var
i: Integer;
inp: String;
begin
readln(inp);
for i := 1 to length(inp)-1 do if inp[i] = inp[i+1] then Write(inp[i], inp[i]);
end.