Solvable models of working memories