Synthesis of 3-substituted pyridinium salts