Rape attempt: man gets 12-and-a-half-year jail term