2 of 5 added 14 characters in body

Dyalog APL, 24 bytes

{2⊥¨↓⍉↑{⍵[⍋⍵]}¨↓2⊥⍣¯1⊢⍵}

Try it online!