m:-prompt1(''),readln([X]),N is X-1,between(0,N,I),\+writef('%r%r ',[' ',N-1-I mod N,*,I mod N*2+1]).