In a medina, palaces and residences as well as public places like mosque-madrasa-hospital complexes and private living spaces rather coexist alongside each other. The buildings tend to be more inwardly oriented, and are separated from the surrounding "outside" either by walls or by the hierarchical ordering of the streets, or both. Streets tend to lead from public main roads to cul-de-sac byroads and onwards into more private plots, and then end there. There are no, or very few, internal connections between different quarters of the city. In order to move from one quarter to the next, one has to go back to the main road again.