The decimal representation of a fraction \( \frac{p}{q} \) (where \( p \) and \( q \) are relatively prime positive integers, and \( p < q \)) contains the digits 3, 7, and 9 consecutively, and in that order. Find the smallest value of \( q \) for which this is possible. Let's think step by step and output the final answer within \boxed{}.
user