delete kth from end