Basic greedy layout alogrithm.
Give priority to horizontal split.