program boc;
VAR S:STRING;
I:INTEGER;
BEGIN
READLN(S);
i:=1;
repeat
BEGIN write(s[i]);
IF S[I]='*' THEN
BEGIN
DELETE(S,I,1);
I:=I-1
END
ELSE
BEGIN
INSERT(S[I],S,I);
I:=I+1
END
END;i:=i+1
until i>length(s);
writeln(s)
END.