define remove front */'1'* = '' back */'1'* = '' right */'1'* = '' left */'1'* = '' /(return) define test(s) s */'2'* *ft/'1'* *bk/'1'* *lt/'1'* *rt/'1'* /f(xxx) front ** ft /s(freturn) back ** bk /s(freturn) left ** lt /s(freturn) right ** rt /s(freturn) front = ft front right = rt right left = lt left back = bk back /(return) define build(s) $s *1/'1'* *2/'1'* *3/'1'* *4/'1'* *5/'1'* *6/'1'* /f(xxx) $(s '1') = 1 2 3 4 5 6 $(s '2') = 1 2 6 5 3 4 $(s '3') = 1 2 4 3 5 6 $(s '4') = 1 2 5 6 4 3 $(s '5') = 3 4 1 2 6 5 $(s '6') = 3 4 5 6 1 2 $(s '7') = 3 4 2 1 5 6 $(s '8') = 3 4 6 5 2 1 $(s '9') = 5 6 1 2 3 4 $(s '10') = 5 6 4 3 1 2 $(s '11') = 5 6 2 1 4 3 $(s '12') = 5 6 3 4 2 1 $(s '13') = 2 1 3 4 6 5 $(s '14') = 2 1 6 5 4 3 $(s '15') = 2 1 4 3 5 6 $(s '16') = 2 1 5 6 3 4 $(s '17') = 4 3 1 2 5 6 $(s '18') = 4 3 5 6 2 1 $(s '19') = 4 3 2 1 6 5 $(s '20') = 4 3 6 5 1 2 $(s '21') = 6 5 1 2 4 3 $(s '22') = 6 5 4 3 2 1 $(s '23') = 6 5 2 1 3 4 $(s '24') = 6 5 3 4 1 2 /(return) start a = 'wbrrrg' b = 'wbbrgg' c = 'wbgrwg' d = 'wgwrrb' build('a') build('b') build('c') build('d') a = '1' l1 x1 = $('a' a) test(x1) /f(xxx) b = '1' l2 x2 = $('b' b) test(x2) /f(t2) c = '1' l3 x3 = $('c' c) test(x3) /f(t3) d = '1' l4 x4 = $('d' d) test(x4) /f(t4) syspot = x1 syspot = x2 syspot = x3 syspot = x4 remove() t4 d = d + '1' d '25' /f(l4) remove() t3 c = c + '1' c '25' /f(l3) remove() t2 b = b + '1' b '25' /f(l2) remove() a = a + '1' a '13' /f(l1) end syspot = 'Done...'