push( @{ $y{ ($a = $_, ( grep {$a=~/$_/} @t )[0] || next)[1] } }, $_ ) for @f;