solve
 
Magnets