#!/usr/bin/perl
#

sub trim {
	my $string = shift;
	for ($string) {
		s/^\s+//;
		s/\s+$//;
	}
        return $string;
}

my $line;

while($line = <STDIN>) {
	chomp($line);

	if (!($line =~ /^ .*/)) {
		print "\n";
	}
	$line = trim($line);
	print $line;
}

print "\n";