#! /usr/bin/perl -w

my @input = <>;
chomp @input;
my $lastClient = '';
#print scalar( @input ) . "\n";
@headers = split( "\t", shift(@input)  ) ;
foreach my $line (sort @input) {
   @values = split( "\t", $line ); 
   my %record = map{ $headers[$_],$values[$_] } (0 .. $#values);
   if ( $lastClient ne $record{'# Client'} ) {
      $lastClient = $record{ '# Client' };
      print "#########################################\n";
      print "#   " . $record{ '# Client' } . "\n";
      print "#########################################\n";
   }
   foreach my $key ( sort keys %record ) {
      next if $key eq '# Client';
      print $key . ' 'x(10-length($key)) . $record{$key} . "\n" if $record{$key};
   }
   print "\n";
}


#print join( "\n", @headers );

1;