Double squares from hackercup 2012
Simple trie