data Expr = Var Int | Lambda Int Expr |  App Expr Expr
          | S | K | I | B | C
            deriving Eq
            
instance Show Expr  where 
 show (Var n) = int2Str n
 show (Lambda n e) = "\\ " ++ int2Str n ++ " .(" ++ show e ++ ")"
 show (App e1 e2)  = "(" ++ show e1 ++ " " ++ show e2 ++ ")"
 show S = "S"
 show K = "K"
 show I = "I"  
 show B = "B"
 show C = "C" 
 
int2Str :: Int -> String
int2Str n = ["abcdefghijklmnopqrstuvwxyz" !! (n-1)]
