Hierarchy of critical temperatures in four-layered ferromagnet/superconductor nanostructures and control devices