PATTERN TRIES