Connected Components Structured Prediction