Solve each variation problem.

n varies directly as q, and n= 39 when q=3. Find n when q=8.