Pepper, contains an alkaloid of pyridine called piperine. Piperine acts as an irritant if it gets into the nose. It stimulates (or irritates) the nerve endings inside the mucous membrane. This stimulation will cause you to sneeze.