This chapter shall not apply to land owned in any of the Territories of the United States by aliens, which was acquired on or before March 3, 1887, so long as it is held by the then owners, their heirs or legal representatives, nor to any alien who shall become a bona fide resident of the United States, and any alien who shall become a bona fide resident of the United States, or shall have declared his intention to become a citizen of the United States in the manner provided by law, shall have the right to acquire and hold lands in either of the Territories of the United States upon the same terms as citizens of the United States. If any such resident alien shall cease to be a bona fide resident of the United States then such alien shall have ten years from the time he ceases to be such bona fide resident in which to alienate such lands. This chapter shall not be construed to prevent any persons not citizens of the United States from acquiring or holding lots or parcels of lands in any incorporated or platted city, town, or village, or in any mine or mining claim, in any of the Territories of the United States.