print end index