Python script to change the map code