Solid phase synthesis of 5-aminopyrazoles and derivatives