A diverse range of natural and artificial self-propelled particles are known and are used nowadays. Among them, active Brownian particles (ABPs) and run-and-tumble particles (RTPs) are two important classes. We numerically study non-interacting ABPs and RTPs strongly confined to different maze geometries in two dimensions. We demonstrate that by means of geometrical confinement alone, ABPs are separable from RTPs. By investigating Matryoshka-like mazes with nested shells, we show that a circular maze has the best filtration efficiency. Results on the mean first-passage time reveal that ABPs escape faster from the center of the maze, while RTPs reach the center from the rim more easily. According to our simulations and a rate theory, which we developed, ABPs in steady state accumulate in the outermost region of the Matryoshka-like mazes, while RTPs occupy all locations within the maze with nearly equal probability. These results suggest a novel technique for separating different types of self-propelled particles by designing appropriate confining geometries without using chemical or biological agents.