for i in range(512): s='';t='rwx' for j in range(9):s+=2**(8-j)&i and t[j%3]or'-' print'%04o is -'%i+s