Ring-opening of nitrothiophenes with amines: mechanistic and synthetic features