main=interact$f.read.concat.("0x":).reverse.words f 8="" f x=toEnum(read$show$x`mod`512):f(x`div`512)