There's definitely multiple solutions, because I needed all 10 rows for level 5. I came up with (spoilers):
L[d1, r1, c, u1, r1, l1, u2, l2, r4, o]; R[l1, c, r1, d1, u4, l1, o, ~, ~, ~] (with l, r, u and d being directions, c & o being close and open, and ~ being empty - I hope it makes sense lol). I'd love to hear a better solution, though!

