Define $f(x)$ as $\frac{x^2-x-2}{x^2+x-6}$.  $f(f(f(f(1))))$ can be expressed as $\frac{p}{q}$ for relatively prime positive integers $p,q$. Find $10p+q$.
1. First, we simplify the function \( f(x) \). Given:
   \[
   f(x) = \frac{x^2 - x - 2}{x^2 + x - 6}
   \]
   We factorize the numerator and the denominator:
   \[
   x^2 - x - 2 = (x + 1)(x - 2)
   \]
   \[
   x^2 + x - 6 = (x + 3)(x - 2)
   \]
   Therefore, the function simplifies to:
   \[
   f(x) = \frac{(x + 1)(x - 2)}{(x + 3)(x - 2)} = \frac{x + 1}{x + 3} \quad \text{for} \quad x \neq 2
   \]

2. Next, we compute \( f(1) \):
   \[
   f(1) = \frac{1 + 1}{1 + 3} = \frac{2}{4} = \frac{1}{2}
   \]

3. Then, we compute \( f\left( \frac{1}{2} \right) \):
   \[
   f\left( \frac{1}{2} \right) = \frac{\frac{1}{2} + 1}{\frac{1}{2} + 3} = \frac{\frac{3}{2}}{\frac{7}{2}} = \frac{3}{7}
   \]

4. Next, we compute \( f\left( \frac{3}{7} \right) \):
   \[
   f\left( \frac{3}{7} \right) = \frac{\frac{3}{7} + 1}{\frac{3}{7} + 3} = \frac{\frac{3}{7} + \frac{7}{7}}{\frac{3}{7} + \frac{21}{7}} = \frac{\frac{10}{7}}{\frac{24}{7}} = \frac{10}{24} = \frac{5}{12}
   \]

5. Finally, we compute \( f\left( \frac{5}{12} \right) \):
   \[
   f\left( \frac{5}{12} \right) = \frac{\frac{5}{12} + 1}{\frac{5}{12} + 3} = \frac{\frac{5}{12} + \frac{12}{12}}{\frac{5}{12} + \frac{36}{12}} = \frac{\frac{17}{12}}{\frac{41}{12}} = \frac{17}{41}
   \]

6. We have found that \( f(f(f(f(1)))) = \frac{17}{41} \). The integers \( p \) and \( q \) are 17 and 41, respectively. We need to find \( 10p + q \):
   \[
   10p + q = 10 \times 17 + 41 = 170 + 41 = 211
   \]

The final answer is \( \boxed{211} \).