Stability of rocking structures