my $levels = 0 ;
my $header = <> ;
my $employees = { map {chomp; split ',',$_ } <> } ;
for (sort keys %$employees) {
do {
print "$_ ";
$_ = $employees->{$_};
$levels++;
} while defined ;
$levels--; # for fencepost
print $levels == 1 ? "--- $levels level" : "--- $levels levels" ;
print $levels > 3 ? "\nYou have $levels layers. Reread Section 5.1.\n" : "\n" ;
$levels = 0 ;
}