The most affordable cities were largely in the Midwest and its surrounding areas, including Cleveland, Louisville, Detroit and St. Louis.