#Find words in word cube solver [tag:code-golf] On social media I often see images with letters and in them was some obvious positive words for people to find. I challenge you to write a program that finds all words in the puzzle that matches a dictionary. An example of such puzzle is this one: ![A letter cube][1] An ASCII representation I made of this: XCUALOVEYKBWSNG DUAWKCBEAUTYRJV YOUTHFSMGNEZLPR MHJREYWDKZLUSTJ FSUCCESSDHEALTH ENMQXPTIMELMSAQ VEXPERIENCEGHBW GHUMOURLOYMONEY SYZPOPULARITYNA AMKCFUNBXHUZYIX CWIHYSHAPPINESS HONESTYCFRIENDS KPYJAETWPOWERQC BTYACFREEDOMJMO RIWINTELLIGENCE Now I imagine we can find words horizontally, vertical and diagonal and all of the mentioned in reverse. The program must be able to take a square and a dictionary [like this one][2] and compute all the matches. As a test case I give custom dictionary dictionary: foo bar fad dir man bid mod god dog sun set And the block: OGFIR DOMAN ODBID You code should be able to find all but the two last words in the dictionary. This is [tag:code-golf] so shortest code wins. [1]: https://i.sstatic.net/6etd9.jpg [2]: http://www.curlewcommunications.co.uk/wordlist.html