solution
 
Magnets