If I understand what you are trying to say, you want to get the id number of the second highest manager assigned to any given employee? If so, just count the number of ids assigned to the given employee and return the second last one:
=INDEX(D3:M3,COUNT(D3:M3)-1)