Like others have said it depends on the countries, for example Argentina as the country A is impossible, because Argentinian nationality is irrevocable as per the constitution, so if you’re born in Argentina you can sign any paper county B asks, and they will get dutifully ignored by Argentina.