Write code to delete duplicate nodes from a sorted linked list.