trie, dsu, eulerian_path