This is for existing records, correct?
You have a few options. The first questions is what is the relationship between Contact and Account. Do you have accounts with multiple contacts? If that is the case, they when you do the update, you can't really control which contact will update the account unless they are based on particular roles.
Your first option, which is probably the easiest is create an On Demand Workflow on the Contact Entity. Add a step to Update the account entity, and set the parameters from contact in the account form.
After you do that, go to the contacts view, select all records (you might need to do this a few times, once per page), click on the Run Workflow button on the command bar, and select the workflow you just created and published.
Your second option is create an SSIS package, and use KingswaySoft Connect for Dynamics 365.
Your source component (can be an OLEDB component or Dynamics CRM Source component) will retrieve the Contact Data, which will contain the ParentCustomerId (account), the state and the country.
You would then use a Dynamics CRM Destination component on the account entity. You would use an Update method and map the ParentCustomerId to the accountId, and the state and the country fields from the Contact entity to the Account entity.
Your third option is to create a simple console application (add the required CRM references), and you will need to create a couple of functions:
RetrieveContacts function will return an Entity Collection with a list of all the Contacts, and make sure to add the parentcustomerid, state and country attributes to the Columnset
UpdateAccount function will update the account by calling the update method and passing the account id (from parentcustomerid), the state and the country.
Hope this helps.