# [05AB1E], <s>19</s> 17 bytes áΣl}.γl}éεgyθ‚}JJ [Try it online!][TIO-jr1ps06z] or as a [Test Suite](https://tio.run/##yy9OTMpM/V9TVvn/8MJzi3Nq9c5tzqk9vPLc1vTKczseNcyq9fL6X2mvpKBrp6Bkr/PfO7MkO7FEISQxLz2fyyWxJDEpsThVISCxqCSzJDM/rxgoU5wNAA) [05AB1E]: https://github.com/Adriandmen/05AB1E [TIO-jr1ps06z]: https://tio.run/##ATsAxP9vc2FiaWX//8OhzqNsfS7Os2x9w6nOtWd5zrjigJp9Skr//0RhdGFiYXNlIFBhcnRpdGlvbnMgVGFzaw "05AB1E – Try It Online" **Explanation** á # keep only letters in input Σl} # sort by lower-case .γl} # group by lower-case é # sort by length (stable) ε } # map each to g # its length ‚ # paired with yθ # the last letter JJ # join to string