Anatomy

A female presented with loss of extension of little and ring finger, hypothenar atrophy and metacarpophalangeal joint hyperextension. The nerve injured is: