We consider the scattering and absorption of the H-polarized plane wave by finite and semi-infinite systems of layers in the THz range. Every layer consists of an infinite graphene strip grating embedded into a dielectric slab. The solution of the problem we obtain in several steps. First, with the use of the method of singular integral equations we obtain scattering matrices of a single layer. Then, we present equations for the finite and semi-infinite systems of layers relatively the Fourier amplitudes of the scattered field. The frequency dependences of the reflection, transmission, and absorption coefficients demonstrate the variety of resonances: plasmon, slab-mode, grating-mode resonances, and resonances of the multilayer structure.