# [Nibbles], 7 bytes (14 nibbles) /|``p$/!>>$@!* [Nibbles]: http://golfscript.com/nibbles/index.html ``` /|``p$/!>>$@!* | # filter ``p # all permutations of $ # the input list # by / * # fold-by-multiplication ! # zip together >>$ # list without first element @ # the same list ! # are elements equal? / # finally get first element ``` [![enter image description here][1]][1] [1]: https://i.sstatic.net/vHUOH.png