Put some ferrofluid into the space between the magnets and it will form a plug of fluid. Because the fluid is attracted to the magnets it will try to occupy all of the space and if you introduce anything non-magnetic into the space it will be repelled.