Multistep sequential batch assembly of three-dimensional ferromagnetic microstructures with elastic hinges