Synthesis of selenium-substituted pyrroles and pyrazol-3-ones