#! /usr/bin/perl

use strict;
use warnings;

my @buffer = ();

while (<>) {
	chomp;
	if (/\d /) {
		print join("\n", @buffer);
		@buffer = ();
		print "$_\n";
	} else {
		push @buffer, $_;
	}
}
