People are on a ledge outside of a building.
People are on a building's ledge outside.
People are on a buildings ledge outside, because they are on the buildings ledge.
exists p1 x1.(exists x2 x3 x4.(on(x1,x2) & of(x3,x4) & n_building(x4) & outside(x2,x3) & n_thing(x3) & n_ledge(x2)) & n_people(x1))
exists p1 x1.(exists x2 x3 x4.(on(x1,x3) & n_outside(x3) & of(x3,x4) & n_ledge(x4) & of(x3,x2) & n_building(x2)) & n_people(x1))