Script to apply constraint in a chain of bones just apply to 1 bone

mrs. RPaladin had the answer.