Anatomy

A 40 year old tailor complains of pain, numbness and weakness of the right hand for the last three months. On examination, there is hypoesthesia and atrophy of thenar eminence. Which one of the following nerves is likely to be involved -