1990 ACM East Central Regional Programming Contest

Problem 2: Comment Removal

Source file: prob2.c or prob2.pas
Input file: prob2.in
Output file: prob2.out

The Problem

Given an arbitrary, syntactically correct, Pascal source program in the file PROB2.IN you are to compress it according to the following guidelines, applied in the order listed:

Compress the input file into the output file PROB2.OUT using the rules above. The results should result in a syntactically valid Pascal program; albeit it in a somewhat less stylish form.

Example

Input

Program Test (input, output);
{ this is a great program }

Var               X, Y        :         integer      ;

  begin
	readln (X, Y);
	   writeln (X,   '  This is Y   ',    Y,     "Hi!')   ;
  end.

Output

Program Test (input, output);
Var X, Y : integer ;
 begin
 readln (X, Y);
 writeln (X, '  This is Y   ', Y, "Hi!') ;
 end.