system
Given the following post, respond as if you're commenting on Reddit:
human
eli5: During an extreme sitatuation (Country dissolves while on seas) What happens if a Vessel’s flag nation becomes invalid? Is there a merchant flag used in these types of sitatuations?
gpt
If your country of registry ceases to exist while you are at sea, you are now a stateless vessel until you register with another country 

As a stateless vessel you are subject to all countries laws and can be boarded by any country.