#include <stdlib.h>
#include <stdio.h>
#define l #define
#define p(p) l p b ( m p u X )

l i    int
l n    struct n
l x ){ return (
l A ->
l N n*

n { i c ; N L ; N R ; N U ; N ( * F ) ( N ) ; } ;

l F A F
l U A U
l R A R
l L A L
l m q = malloc(sizeof * q ) Z F =
l e z F ( p ) ) ; }
l f e N
l g z L Q s f
l h ( N p x
l H h p L U Q
l s R z R = q
l t ) ? p : (
l z , p
l Z , q
l Q = p
l w ! p U t p U L Q z Q U ,
l D W p R U = 0 z R Q R F ( p R ) z R F != E t
l W h w
l X z = q , 0
l V w p F = v z L Q
l O m o Z L Q
l M m E Z A c =
l r Z R Q
l u Z U Q
l a ) ) ) ? 0 : j ( !
l k ( i c x
l y 0 ) ; } i

N q ; N
o H z Q L f
v H U z Q L f
K W V L R f
J W V R f
I h V R f
#if 0
Y W q Q g
#endif
S W w w O L L R r s , O L R r R R g
E D p F Q L A c - p R A c ? J : K f
P D w putchar ( p L R A c ) , m I g
G W M getchar ( ) g
p ;

i j k c ? O U r u U U X : y b k y d k y

l d(d) ( ( d a b
l b(b) ( ( b a d
l E(E) b ( M E u X )

main k i ) ! (

p (I)
p (J)
p (K)
#if 0
p (Y)
#endif
p (P)
p (G)

p (S)
l  B   b (S (K S) K)
l  SS  b (B (B S) B)
l  C   b (SS B S (K K))
l  CC  b (B (B C) B)
l  BB  b (CC B (B B B) B)

l  Y   b (S (C B (S I I)) (C B (S I I)))

l  CI  b (C I)

l ef E(EOF)
l sp E(' ')
l ob E('(')
l cb E(')')
l lm E('\\')
l nl E('\n')
l ht E('\t')
l qs E('S')
l qk E('K')
l qi E('I')

l pair b (BB (B (B K)) C CI)
l atom b (B K CI)

l bind b (CC B B C)

l ore b (SS (CI K))
l gns b (Y (B (bind G) (CC S (C (ore sp (ore nl ht))) CI)))

l pr b (Y (CC C (BB CI (B (BB (bind (P ob)) K)) (SS C (CC C (BB BB bind) K) (C (CC bind) (K (P cb))))) P))

l trans b (Y (B (bind gns) (S (BB S (C lm) lam) (C (BB S (C ob) brac) (S (C cb (CI (atom sp))) (S (C ef (CI (atom sp))) (B CI atom)))))))

l brac b (S bind (B Y (C (BB B B bind) (S (BB S (BB S (S I)) (CC (BB (B K)) (BB K) pair)) (CC S (CC BB (BB C (C (CI sp)) CI)) pair)))))
         
l lam b (B (bind gns) (C (CC BB bind (B CI)) abs))

l abs b (Y (C (BB S (BB C CI) (SS S (BB C (BB B opt)) I)) (CC S (C C (atom qi)) (B (pair (atom qk)) atom))))

l make b (B pair (pair (atom qs)))

l opt b (S (S I (S (BB (CC B) CI (BB K K make)) (S (BB C (BB C (C (CI qk))) (SS (SS S) (S (BB (BB (S I)) S (BB (BB (CC B) CI) (BB K K) make)) (B (CC B (BB (CC C) (BB (C (CI qk)) (pair (atom qk))) pair)) make)) (B (C (BB B C (C (CI qi)))) make))) make))) (B K make))

(bind (bind trans pr) (P nl) I)

e
