delete index and search reverse input when dealing with words end