For the record, OP appears to be thinking of the Canon a 2 cancrizans from J.S. Bach’s Musical Offering. It’s written out as a single melody that can be played forwards, backwards, and the forwards and backwards versions can be played simultaneously in counterpoint with one another.
Either that, or they’re thinking of “Jumping Queen” by Beethoven.











