The shell model for T = 0 and T = 1 states in the middle of the sd shell