I am trying to enter a song with first, second, and third endings.

I put an open repeat at the beginning of the part I want to repeat, and a close repeat at the end of the first ending. No problem so far: It plays the body, the first ending, the body again, and the second ending. But now I don't understand how to get it to go back to the open repeat and then skip the second ending.

I tried putting a sign at the repeat point and adding "D.S. al 3rd ending" at the end of the second ending, but that didn't seem to do anything about skipping the second ending the second time around.

So is there a formula for doing this so that it works? The online manual seems vague.