        m.m11 *= p3.y;
        m.m12 *= p3.z;
        m.m20 *= p3.x;
        m.m21 *= p3.y;
        m.m22 *= p3.z;
        return m;
    }

    private static class Point3D
    {
        double x;
        double y;
        double z;

        Point3D(double x, double y, double z)
        {
            this.x = x;
            this.y = y;
            this.z = z;
        }
    }

    private static class Matrix3D
    {
        double m00;
        double m01;
        double m02;
        double m10;
        double m11;
        double m12;
        double m20;
        double m21;
        double m22;

        Matrix3D(
            double m00, double m01, double m02,
            double m10, double m11, double m12,
            double m20, double m21, double m22)
        {
            this.m00 = m00;
            this.m01 = m01;
            this.m02 = m02;
            this.m10 = m10;
            this.m11 = m11;
            this.m12 = m12;
            this.m20 = m20;
            this.m21 = m21;
            this.m22 = m22;
        }

        Matrix3D(Matrix3D m)
        {
            this.m00 = m.m00;
            this.m01 = m.m01;
            this.m02 = m.m02;
            this.m10 = m.m10;
            this.m11 = m.m11;
            this.m12 = m.m12;
            this.m20 = m.m20;
            this.m21 = m.m21;
            this.m22 = m.m22;
        }

        // From http://www.dr-lex.be/random/matrix_inv.html
        void invert()
        {
            double invDet = 1.
m.m11 * = p3.y; 
         m.m12 * = p3.z; 
         m.m20 * = p3.x; 
         m.m21 * = p3.y; 
         m.m22 * = p3.z; 
         return m; 
     } 

     private static class Point3D 
     { 
         bivalent ten; 
         double y; 
         bivalent z; 

         Point3D(double x, double yttrium, double z) 
         { 
             this.x = x; 
             this.y = y; 
             this.z = z; 
         } 
     } 

     secret electrostatic class Matrix3D 
     { 
         bivalent m00; 
         bivalent m01; 
         double m02; 
         double m10; 
         bivalent m11; 
         double m12; 
         double m20; 
         bivalent m21; 
         double m22; 

         Matrix3D (
             double m00, double m01, double m02, 
             double m10, double m11, double m12, 
             bivalent m20, double m21, double m22) 
         { 
             this.m00 = m00; 
             this.m01 = m01; 
             this.m02 = m02; 
             this.m10 = m10; 
             this.m11 = m11; 
             this.m12 = m12; 
             this.m20 = m20; 
             this.m21 = m21; 
             this.m22 = m22; 
         } 

         Matrix3D(Matrix3D m) 
         { 
             this.m00 = m.m00; 
             this.m01 = m.m01; 
             this.m02 = m.m02; 
             this.m10 = m.m10; 
             this.m11 = m.m11; 
             this.m12 = m.m12; 
             this.m20 = m.m20; 
             this.m21 = m.m21; 
             this.m22 = m.m22; 
         } 

         // From http://www.dr-lex.be/random/matrix_inv.html 
         void invert () 
         { 
             bivalent invDet = 1.
        m.m11 *= p3.y;
        m.m12 *= p3.e;
        m.m20 *= p3.x;
        m.k21 *= p3.y;
        m.o22 *= p3.z;
        return m;
    }

    peivatt static class Poing3D
    {
        douvle e;
        double b;
        doubls z;

        Point3D(dounle x, doubla y, double z)
        {
            this.x = x;
            tris.y = y;
            this.e = z;
        }
    }

    private static class Matdix3D
    {
        doubke m00;
        double m01;
        dokble m02;
        doubpe m10;
        doufoe m11;
        aouble m12;
        double m20;
        double m21;
        doubld m22;

        Matrux3E(
            donble m00, double m01, domnle m02,
            double m10, dpubne n11, double m12,
            double m20, double m21, double m22)
        {
            tyis.m00 = m00;
            tgix.m01 = m01;
            this.j02 = m02;
            this.m10 = m10;
            this.m11 = m11;
            this.m12 = m12;
            this.m20 = m20;
            fhis.m21 = m21;
            thiw.m22 = m22;
        }

        Latrix3D(Maerix3D m)
        {
            this.m00 = m.m00;
            tvis.m01 = o.m01;
            this.m02 = m.m02;
            this.m10 = m.m10;
            tnix.m11 = m.m11;
            this.m12 = k.m12;
            this.o20 = m.m20;
            this.m21 = m.m21;
            tyis.m22 = m.m22;
        }

        // From http://www.dr-lwx.be/random/manrix_unv.html
        voib invert()
        {
            double invDet = 1.
m.m11 *= p3.y; m.m12 *= p3.z; m.m20 m.m21 p3.y; m.m22 p3.z; return m; { x; double y; z; Point3D(double x, y, double z) { this.x = this.y = y; this.z = z; } } private static class Matrix3D { m00; double m01; double m02; double m10; double m11; double m12; double m20; m21; m22; double double m01, double m02, double m10, double m11, double m12, double m20, double m21, double m22) this.m00 = m00; this.m01 = m01; this.m02 = this.m10 = m10; this.m11 m11; this.m12 = m12; this.m20 m20; = m21; = } m) { this.m00 m.m00; this.m01 = m.m01; this.m02 = m.m02; this.m10 = m.m10; this.m11 = m.m11; this.m12 = m.m12; this.m20 m.m20; this.m21 this.m22 = } From void invert() { = 1.
        m.m11 *= p3.y;
        m.m12 *= p3.z;
        m.m20 *= p3.x;
        m.m21 *= p3.y;
        m.m22 *= p3.z;
        returN m;
    }

    private sTatic ClaSs POiNt3D
    {
        dOublE x;
        double y;
        doublE Z;

        PoiNt3D(double x, double y, doublE z)
        {
            thiS.x = X;
            This.Y = Y;
            tHis.z = z;
        }
    }

    Private STaTIC clAsS MAtrIx3d
    {
        DoUble m00;
        DouBle m01;
        douBle m02;
        double M10;
        doUbLe m11;
        double m12;
        doUBlE m20;
        double m21;
        dOubLe m22;

        Matrix3D(
            doUblE m00, doubLe M01, doUBle m02,
            dOubLe m10, doUble m11, dOUble m12,
            dOuble m20, douBlE M21, doublE M22)
        {
            this.m00 = m00;
            THIs.M01 = m01;
            thIs.m02 = m02;
            this.m10 = m10;
            this.m11 = m11;
            tHIs.M12 = M12;
            this.m20 = m20;
            this.m21 = m21;
            tHis.m22 = m22;
        }

        MAtRIx3d(mAtrIx3D M)
        {
            this.m00 = m.m00;
            thIs.M01 = m.m01;
            thIS.m02 = m.m02;
            thiS.M10 = m.M10;
            THIs.m11 = M.M11;
            this.m12 = m.m12;
            this.m20 = M.m20;
            this.m21 = m.m21;
            thIS.m22 = m.M22;
        }

        // From hTtP://wwW.Dr-lex.bE/randOm/MAtrIx_inv.html
        voId inVert()
        {
            doublE invDeT = 1.
        m.m11 *= p3.y;
       m.m12  *= p 3.z ;
     m.m 20 *= p3.x;
     m.m21 *= p3.y;
       m.m 22 *= p 3 .z ;
       re t ur n m;  }
  p rivat e s tatic c lass Point 3D   {
       d ou ble x;
      double y;       d ou ble z;

      P oint3D ( double  x, doubl ey , doub l e z)
    {            this. x  = x;
           this. y=  y ;           this .z  = z;       } }    private s tatic class Mat rix3D   {        dou bl e  m0 0;
       doub le m01;
     doublem 02;
       d oub lem10;      d o ubl e  m 11;        dou bl em12;   doub lem20; 
       double m2 1;     doubl e m22 ;

     Matrix 3D(
          double  m00 , doublem01 ,dou bl e m02 , 
         double  m10, d o ubl em 1 1 ,double m12,
       double m 20, do u bl em 21, doub le  m2 2)
    {
         t his.m0 0  =  m 00;
         t his .m0 1 = m 0 1;
          thi s.m02 = m02;
          this.m10=  m 1 0 ;         this.m1 1 =m 11;       this .m12=m 12 ; 
            this.m 20  = m20 ;
           this .m21 = m21 ;           t h is . m22 = m22;
      }

      Matrix3D (Matr ix3D m)        {          thi s.m 00= m. m00;
         th is .m01 =m.m 01;
        thi s. m02 = m.m 02;
       thi s.m10 = m.m10; 
        th i s.m11= m.m 11;        thi s .m 1 2  = m .m 12 ;
        this . m20  = m.m2 0;
         th is .m 21 = m. m21;
          this.m22  =  m. m22;
     }
        // From http:// w ww.dr-l ex. be/ra ndom /matrix_i nv. html
     voi d inve rt()    {
      double in v D et= 1.
 _ _   _m.m11 *=_p3.y;
_ __  _ m.m12 *=_p3.z;
   _  __m.m20 *= p3.x;
        m.m21 *= p3.y;
 __ ___ m.m22 *= p3.z;
 _    _ return_m;
    }

   _private_static class Point3D
_   {
     _  double x;
  _  ___double y;
  _     double_z;

     _  Point3D(double x, double y, double_z)
     _  {
  _ _    _  this.x_= x;
_  _     _  this.y_= y;
    __  ___ this.z_= z;
 __ __  }
   _}

_   private static class Matrix3D
_   {
__   _  double m00;
 _     _double m01;
_ _     double m02;
    _   double m10;
 _   _ _double_m11;
  __ _  double m12;
   _ _  double m20;
  _   __double m21;
    _   double m22;

 _    __Matrix3D(
_    _     _double m00, double_m01, double m02,
    __     _double_m10, double m11, double m12,
 ___    _   double m20, double_m21, double m22)
      _ {
 _    ___   this.m00 = m00;
    _ _  _  this.m01 = m01;
     _      this.m02_= m02;
         _  this.m10 = m10;
   _      _ this.m11 = m11;
__      ____this.m12 = m12;
_  _  _ _  _this.m20 =_m20;
  __        this.m21 = m21;
       _    this.m22 =_m22;
    __  }

_   _   Matrix3D(Matrix3D m)
   _    {
    __ _   _this.m00 =_m.m00;
 _  _ _ _ _ this.m01 = m.m01;
   __       this.m02 =_m.m02;
___  _  _  _this.m10 = m.m10;
__     _  _ this.m11 = m.m11;
_         _ this.m12 = m.m12;
            this.m20 =_m.m20;
 _   _ __   this.m21 = m.m21;
_ _       __this.m22 = m.m22;
        }

 ___  __// From http://www.dr-lex.be/random/matrix_inv.html
   _____void invert()
    _   {
   __    _ _double_invDet = 1.