import Char (intToDigit)
import Numeric (showIntAtBase)
import Data.Word
cletus :: Word8 -> Word8
cletus x = round $ (fromIntegral x) * 255 / 31
test :: (Word8 -> Word8) -> [Word8]
test f = map f [0..31]
showBin :: Word8 -> String
showBin x = f $ showIntAtBase 2 intToDigit x []
where f = until (\x -> length x >= 8) ('0':)
main :: IO ()
main = mapM_ (putStrLn . showBin) (test cletus)