#define R return
                               typedef int     j;typedef/*\       */struct
                           {j c,u,                      p;}k;char a[   15][2
           ][99]={{     "A","                                4"},         {"E"
         ,"3"},{"I","1"},{                                   "L"            ,"1"
       },{"        O","                                                  0    "},
      {"S  "         ,"5                                                 "},{  "T"
     ,"  7"}                                                              ,{"IL \0"
    ," I1\0                                                               "},{"L I"
   ,"1I"},                                                                {"S.","Z."
  },{"YOU.                                    ",                   "J 00  ."},{ "TH"
  "E.","D     A                        ."}     ,        {"         DU  DE  ","D  00D"
 },{" EL     IT                       E" ,"    L33T      "}  ,{"    CO  MP UTER"  ,/*
 */" BOX    "}   },*   s    ;k  u[9   ]   ,p    [9],c     ;  j q,   v,e  ,d , i,   x,y
;l() {;    for   (i   =0   ;s [i  ];i++    );   ;R i;}o   (j  z){{   ;}   putchar   (z)
;}b (k*   t,    j f  ){   if  ((     f>     64  &&  90>=   f) || (f  >96  &&f< 123   ))
{t  ->    c    =(t  ->    u   =(             96  <  f) )?  f- 32 :f   ;t   ->p =0;   }/*
*/else   {t    ->   c=   46   ;               t  ->  u= 0;  e  =  (   (t   ->p =f)    <
0  );   }}r   (){  for   (i  =0               ;i <q  ;i  ++ ){ b  (&  c,s   [i  ])
;  if   (!   s[i   ]||  p[i  ].               c- c    .  c) {R 0  ;}   }R   1;  }m
  (){  for   (d    =14  ;d>-1;d--              ){s=a[d][  (0)] ;  if   (l   ()  ==
  q&&  r(   ))/*  */ break;}}n(){              if(!v){b(&p[q],e?  -1  /*04  08  01
  SY   e    !*/: getchar());}else              {p[q].c=u[--v].c;p[q]  .u=u  [v  ].
  u;  p[   q].p=u[v].p;}} w  (  ){s            =a[d]  [    1] ;o(p[0  ].p?  p[  0]
  .p  :p   [0 ].u?s   [0] |  32   :s[           0]   );    if (   (i =l())  >1  ){
  y=  p[  1]  .u;     --  i;for     (x         =1    ;x    <i;x   ++)o(y?s  [  x]|
  32  :s  [x  ]);o    (p   [ q-     1]        .p?    p[    q-1]   . p:y ?s [i  ]|
  32  :s [i] ); }}     main(){for(   x  =0;x  <15;x++)for(y=0;y  <2 ;y  ++ ){ for
  (i  =d =0  ;a  [x][y][d];d++){if   (a[x  ][y][d]-32)     a[x   ][y][ i++ ]= a[x
  ][  y][d]   ;  }a[x        ][y][   i        ]= 0;        }v    =q=e= 00; ; for(
  n() ;q++    ||  (v           ||   !e        );           n(   )){for (d  = y=0
  ;d<  15;    ++   d)               {s   =a[   d]          [    0];if  (r   ())
  {++   y;    x=   d;}             }d    =x;   if         (     (y == 1))  {s=
  a[d]  [0     ];   ;if           (l            ()             == q)  {w  ();
   q=0  ;}      }   else         if              (!          y){for  (;q >1;
    ){u [v       ].  c=p[      --                  q]       .c;u[v   ].u=p[
    q].u;u        [v   ++]   .p=                     p[q].p;m();    if(d>
     -1){w          ();q=0;{;}                          break      ;}}if
      (q==1               ){m         ();if(          (d)>         -1)
       w();                else                      if(p         [0
        ].c                  >-1)o               (p[0].          p?
         p[0                   ].p:p[0].   u?32|p[0].           c
           :p                      [0].c);q=0;}}
            }}