# class ListNode:
# def __init__(self, x):
# self.val = x
# self.next = None
#
#
# @param head ListNode类
# @return ListNode类
#
class Solution:
def deleteDuplicates(self , head ):
# write code here
if head == None:
return head
poc = head
ed = poc
while poc != None:
if ed.val != poc.val:
ed.next = poc
ed = ed.next
poc = poc.next
ed.next = None
return head