Consider all words containing only letters $A$ and $B$. For any positive integer $n$, $p(n)$ denotes the number of all $n$-letter words without four consecutive $A$'s or three consecutive $B$'s. Find the value of the expression
\[\frac{p(2004)-p(2002)-p(1999)}{p(2001)+p(2000)}.\]