struct ListNode* deleteDuplicates(struct ListNode* head ) {
    // write code here
    if(head==NULL)
        return head;
    struct ListNode* H=malloc(sizeof(struct ListNode));
    H->next=head;
    struct ListNode* cur=H;
    while(cur->next->next!=NULL&&cur->next!=NULL)
    {
        if(cur->next->val==cur->next->next->val)
        {
            int n=cur->next->val;
            while(n==cur->next->val&&cur->next!=NULL)
            {
                cur->next=cur->next->next;   
            }
        }
        else
        {
            cur=cur->next;    
        }
    }
    return H->next;
}