Unless there are other considerations (e.g. ground conditions, safety etc.), the referee tosses a coin to decide the side the substituted player leave the field of play.
Or Rock, Paper, Scissors maybe?
Help keep RefChat running, any donation would be appreciated