Man seriously injures judge and marshal, attacks during sentencing