Anatomy

A patient with external hemorrhoids develops pain while passing stools. Which of the following nerve mediating this pain?