#! /usr/bin/perl

use strict;
use warnings;

my @buffer = ();

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