Spanish economy contracts 1% in second quarter