A container in the shape of a right circular cone is 12 inches tall and its base has a 5-inch radius. The liquid that is sealed inside is 9 inches deep when the cone is held with its point down and its base horizontal. When the liquid is held with its point up and its base horizontal, the liquid is $m-n\sqrt[3]{p},$ where $m,$ $n,$ and $p$ are positive integers and $p$ is not divisible by the cube of any prime number. Find $m+n+p.$
1. **Determine the volume of the cone and the volume of the liquid:**
   - The volume \( V \) of a cone is given by:
     \[
     V = \frac{1}{3} \pi r^2 h
     \]
     where \( r \) is the radius of the base and \( h \) is the height.
   - For the given cone, \( r = 5 \) inches and \( h = 12 \) inches:
     \[
     V_{\text{cone}} = \frac{1}{3} \pi (5)^2 (12) = \frac{1}{3} \pi (25) (12) = 100 \pi \text{ cubic inches}
     \]
   - The liquid fills the cone to a depth of 9 inches. The volume of the liquid can be found by considering a similar smaller cone with height 9 inches and radius \( r' \):
     \[
     \frac{r'}{5} = \frac{9}{12} \implies r' = 5 \cdot \frac{9}{12} = 3.75 \text{ inches}
     \]
     \[
     V_{\text{liquid}} = \frac{1}{3} \pi (3.75)^2 (9) = \frac{1}{3} \pi (14.0625) (9) = 42.1875 \pi \text{ cubic inches}
     \]

2. **Calculate the volume of the remaining section of the cone:**
   - The remaining volume when the cone is inverted is:
     \[
     V_{\text{remaining}} = V_{\text{cone}} - V_{\text{liquid}} = 100 \pi - 42.1875 \pi = 57.8125 \pi \text{ cubic inches}
     \]

3. **Determine the height of the liquid when the cone is inverted:**
   - When the cone is inverted, the remaining volume forms a smaller cone at the tip. Let the height of this smaller cone be \( h' \):
     \[
     \frac{V_{\text{remaining}}}{V_{\text{cone}}} = \left(\frac{h'}{12}\right)^3
     \]
     \[
     \frac{57.8125 \pi}{100 \pi} = \left(\frac{h'}{12}\right)^3
     \]
     \[
     \frac{57.8125}{100} = \left(\frac{h'}{12}\right)^3
     \]
     \[
     0.578125 = \left(\frac{h'}{12}\right)^3
     \]
     \[
     \left(\frac{h'}{12}\right)^3 = \frac{37}{64}
     \]
     \[
     \frac{h'}{12} = \sqrt[3]{\frac{37}{64}} = \frac{\sqrt[3]{37}}{4}
     \]
     \[
     h' = 12 \cdot \frac{\sqrt[3]{37}}{4} = 3 \sqrt[3]{37}
     \]

4. **Calculate the depth of the liquid when the cone is inverted:**
   - The depth of the liquid when the cone is inverted is the total height minus the height of the remaining section:
     \[
     \text{Depth} = 12 - h' = 12 - 3 \sqrt[3]{37}
     \]

5. **Identify \( m, n, \) and \( p \):**
   - Comparing with the form \( m - n \sqrt[3]{p} \):
     \[
     m = 12, \quad n = 3, \quad p = 37
     \]

6. **Sum \( m, n, \) and \( p \):**
   \[
   m + n + p = 12 + 3 + 37 = 52
   \]

The final answer is \( \boxed{52} \)