Regioselective cyclization of chloroacylaminobenzenesulfonamide derivatives