(if:$start is not 1)[(set:$length to (num:$length))(set:$pos to 1)(set:$start to 1)](set:$disp to 0)(set:_pos to $pos)(set:_fix to (round:$pos/$length-0.51))(if:_fix>=0)[(str-repeated:_fix,"(set:_pos to _pos - $length)")](str-repeated:$length,"\n"+(str-repeated:$length,"(set:$disp to $disp+1)(if:$pos is $disp)[X](else:)[O]"))
(if:$pos>$length)[(link:"Up")[(set:$pos to $pos-$length)(goto:"re")]]
(if:$pos<$length*$length-$length+1)[(link:"Down")[(set:$pos to $pos+$length)(goto:"re")]]
(if:_pos>1)[(link:"Left")[(set:$pos to $pos-1)(goto:"re")]]
(if:_pos<$length)[(link:"Right")[(set:$pos to $pos+1)(goto:"re")]](input:bind $length)
(link:"Enter")[(goto:"re")]