Counting Words With a Given Prefix