{ tartinai daug, net labai daug tarp—}
{$A+,B-,D+,E+,F-,G-,I-,L+,N-,O-,P-,Q-,R-,S-,T-,V+,X+,Y+}
               Program                unknown;
usEs asmas;
     var    i    :    bytE;
         t1,    t2    :    loNgiNt;
         timE    :    loNgiNt    absolutE    $40:$6C;
               c       :          char;
                  b             :          bytE;
                     Nuv             :                      boolEaN;
                                                x, y, xb, yb : iNtEgEr;
                                    rodb    :    rodyklE;
bb          :                      boolEaN;
               procEdurE      Nuvalyk (xb, yb : iNtEgEr; rodb : rodyklE; bb : boolEaN);
     bEgiN
    if                          Not      Nuv
      thEN
        bEgiN
          triNk_rod                (xb,                yb,                     rodb,      bb);
                                                            b := 255;
                         Nuv                :=                     truE;
                                 ENd;
                 ENd;
                                procEdurE pErpiEsk (var b1 : bytE; b2 : bytE; x, y : iNtEgEr;
                                                                    rod : rodyklE; b : boolEaN);
                                                    bEgiN
                                                      if b1 <> b2
                                                        thEN
                                                        bEgiN
                                                               Nuvalyk (xb, yb, rodb, bb);
                                                             b1 := b2;
                                                           piEsk_rod (x, y, rod, b);
                                                           Nuv := falsE;
                                                                  xb := x;
                                                                       yb := y;
                                                            rodb := rod;
                                                                          bb := b;
                                                                        ENd;
                                                                  ENd;
        fuNctioN poly1 (x, y, x1, x2, y1, dx1, dx2 : iNtEgEr) : boolEaN;
                var i : bytE;
                 bEgiN
               poly1 := falsE;
                  for i := 0 to 8 do
                 if iNhliNE (x, y, x1 + i * dx1, x2 + i * dx2, y1 + i)
                           thEN
                       bEgiN
                               poly1 := truE;
                         Exit;
                       ENd;
               ENd;
                      fuNctioN poly2 (x, y, x1, y1, y2, dy1, dy2 : iNtEgEr) : boolEaN;
                        var i : bytE;
                      bEgiN
                        poly2 := falsE;
                        for i := 0 to 8 do
                          if iNhliNE (y, x, y1 + i * dy1, y2 + i * dy2, x1 + i)
                            thEN
                              bEgiN
                                poly2 := truE;
                                Exit;
                              ENd;
                      ENd;
                   fuNctioN poly3 (x, y, x1, x2, y1, dx1, dx2 : iNtEgEr) : boolEaN;
                        var i : bytE;
                      bEgiN
                              poly3 := falsE;
                              for i := 0 to 26 do
                                if iNhliNE (x, y, x1 + i * dx1, x2 + i * dx2, y1 + i)
                                  thEN
                                    bEgiN
                                      poly3 := truE;
                                      Exit;
                                    ENd;
                            ENd;
                            procEdurE Exit;
                            bEgiN
                              sEtmodE ($3);
                              disposE (scr);
                              disposE (scr2);
                            ENd;
                          bEgiN
                            raNdomizE;
                            sEtmodE ($13);
                            sEtpal (1, 03, 53, 03); sEtpal (2, 40, 63, 63); sEtpal (3, 53, 33, 00);
              sEtpal (4, 58, 58, 00); sEtpal (5, 03, 03, 53); sEtpal (6, 53, 03, 03);
              paiNt (1); mousEshapE (shapE, 2, 1); sEtmousExy (137 * 2 + 1, 77);
                             showmousE; scr2^ := scr^; b := 255; Nuv := truE;
                    rEpEat
                                      x := mousEx;
                                      y := mousEy;
                                      if kvad (x, y, 167, 77, 30)
                                       thEN pErpiEsk (b, 6, 172, 70, rodxy2, truE)
                                       ElsE if kvad (x, y, 197, 77, 30)
                                        thEN pErpiEsk (b, 7, 202, 70, rodxy2, truE)
                                        ElsE if kvad (x, y, 137, 107, 30)
                                         thEN pErpiEsk (b, 14, 131, 111, rodxy2, falsE)
                                         ElsE if kvad (x, y, 137, 137, 30)
                                          thEN pErpiEsk (b, 15, 131, 141, rodxy2, falsE)
                                          ElsE if poly1 (x, y, 159, 186, 68, 1, 1)
                                           thEN pErpiEsk (b, 2, 172, 70, rodxy1, truE)
                                           ElsE if poly1 (x, y, 189, 216, 68, 1, 1)
                                            thEN pErpiEsk (b, 3, 202, 70, rodxy1, truE)
                                            ElsE if poly1 (x, y, 109, 136, 48, 1, 1)
                                             thEN pErpiEsk (b, 21, 108, 48, rodz, truE)
                                             ElsE if poly1 (x, y, 119, 146, 58, 1, 1)
                                              thEN pErpiEsk (b, 22, 118, 58, rodz, truE)
                                              ElsE if poly2 (x, y, 128, 99, 126, 1, 1)
                                         thEN pErpiEsk (b, 10, 131, 111, rodxy1, falsE)
                                         ElsE if poly2 (x, y, 128, 129, 156, 1, 1)
                                          thEN pErpiEsk (b, 11, 131, 141, rodxy1, falsE)
                                   ElsE if poly2 (x, y, 108, 49, 76, 1, 1)
                                    thEN pErpiEsk (b, 17, 108, 48, rodz, falsE)
                                    ElsE if poly2 (x, y, 118, 59, 86, 1, 1)
                                     thEN pErpiEsk (b, 18, 118, 58, rodz, falsE)
                                     ElsE if poly1 (x, y, 119, 153, 68, 1, -2)
                                      thEN pErpiEsk (b, 23, 128, 68, rodz, truE)
                                      ElsE if poly1 (x, y, 156, 156, 68, -2, 1)
                                       thEN pErpiEsk (b, 1, 142, 70, rodxy1, truE)
                                       ElsE if poly2 (x, y, 128, 69, 93, 1, -2)
                                        thEN pErpiEsk (b, 19, 128, 68, rodz, falsE)
                                        ElsE if poly2 (x, y, 128, 96, 96, -2, 1)
                                         thEN pErpiEsk (b, 9, 131, 81, rodxy1, falsE)
                                         ElsE if poly3 (x, y, 138, 138, 79, 0, 1)
                                          thEN pErpiEsk (b, 13, 131, 81, rodxy2, falsE)
                                          ElsE if poly3 (x, y, 139, 165, 78, 1, 0)
                                           thEN pErpiEsk (b, 5, 142, 70, rodxy2, truE)
                                           ElsE Nuvalyk (xb, yb, rodb, bb);
                               if lEftprEssEd
                                 thEN
                                   bEgiN
                                     hidEmousE;
                                     suku_i (b);
                                     showmousE;
                                     b := 255;
                                   ENd
                                 ElsE if rightprEssEd
                                       thEN Exit;
                                 uNtil kEyprEssEd;
                                 Exit;
   ENd.