This is a bit silly so might not work 100% of the time. I'll update it if I find any glaring issues or ways to simplify things.

Player 1

Player 2