when he had arrived at the imperial chambers , overcome with guilt and shame , to ask what he had done to deserve this punishment , he had been turned away .
 when she  had arrived at the imperial chambers, overcome with guilt and shame, to ask what she  had done to deserve this punishment,she  had been turned away.