Strain-induced spin states in atomically ordered cobaltites.