Iterate method to find the nth last element in string