upon arrival , migrants deemed to be from `` safe '' countries like egypt or morocco are immediately deported , but the rest spend up to a year and a half locked in detention centers while their cases are assessed .