Characterization of Strictly singular and strictly cosingular operators by perturbation classes