Trie with generic keys and values.