Baby A or Baby B?

I know that Baby A is closer to the cervix and the other is Baby B, but with a cesarean who comes out first Baby A or B? I've heard that A is first both ways but it makes more sense that if B is closer to pull B out first.