Except in the case prescribed in the following paragraph, when the mayor of the municipality makes an entry in a certificate of residence, the mayor is to enter the resident record code most recently entered in that certificate of residence by the mayor of the municipality who most recently made an entry in the certificate of residence of the person pertaining to that entry.
When the mayor of the municipality makes an entry in a certificate of residence for a person who is to be newly recorded in the basic resident register of that municipality, if that person has never been recorded in the basic resident register of any municipality, the mayor is to enter in the certificate of residence pertaining to that person one resident record code selected from among the resident record codes designated by the Agency under Article 30-2, paragraph (1). In this case, the mayor of the municipality is to select and enter a resident record code that is different from the resident record codes entered in the certificates of residence pertaining to persons other than the person pertaining to that entry.
When the mayor of the municipality has entered a resident record code pursuant to the preceding paragraph, the mayor must promptly notify the person pertaining to that entry, in writing, of that fact and of the resident record code.