disable sync contacts from icloud settings of iphone
to.delete all contacts from iphone enable sync contacts on mac and replace all data in the phone
go to www.icloud.com on ur mac
go to contactsclick the settings icon
you are done
enable sync in icloud settings of the phone to put new data to icloud.