BASIC:

 

MAGNET: