Structured Prediction via the Extragradient Method