map {push @{$h{ $_ }}, shift @B} (@A, reverse @A) x ($#B / $#A /2) ; ##No it is still not good..