{**************************************************************************** Space at end of line removal program ****************************************************************************} program spcend(input, output); var line: array [1..200] of char; i, x: 1..200; begin while not eof(input) do begin for i := 1 to 200 do line[i] := ' '; i := 1; while not eoln(input) do begin read(line[i]); i := i+1; if i > 198 then halt end; readln; x := 200; while (x > 1) and (line[x] = ' ') do x := x-1; if line[x] <> ' ' then x := x+1; for i := 1 to x-1 do write(line[i]); writeln end end.