Tying notes together at the end of repeated sections

Here’s a good one from last year.