Word Squares II

Given a list of words, find all word squares. Unlike Word Squares, you must find them from scratch starting with any word.

Examples
Input: ["area","lead","wall","lady","ball"]
Output: [["ball","area","lead","lady"],["wall","area","lead","lady"]]
Hints

Word Squares II

Given a list of words, find all word squares. Unlike Word Squares, you must find them from scratch starting with any word.