Cognitive maps and novel inferences: a flexibility hierarchy