Consider the following situation,
Batsmen A and B are playing, A is facing the ball and hits the ball inside the ground. Both of them running between the wickets and meet at the centre of the pitch, they saw that the ball is thrown to one end. The player with the ball is waiting without stumping. Then both the batsmen run towards the other end and reached the crease and then now the fielder took off the bails at the other end.
Both the batsmen don't want to give up.
Who is out at this situation according to the rules of cricket/ICC?
The stumping may be done on either A's end or B's end.