simple trie generator for integers