P55 (simpler version of generating balanced trees)