Three people, John, Macky, and Rik, play a game of passing a basketball from one to another. Find the number of ways of passing the ball starting with Macky and reaching Macky again at the end of the seventh pass.

Let's think step by step and output the final answer within \boxed{}.
user