Add trie in swift