#include <iostream>
#include <fstream>

using namespace std;

const size_t SIZE =4;

template<typename T>
class Matrix;

template< typename T>
ostream & operator<< (ostream &, const Matrix<T> &);

template< typename T>
istream& operator >> (istream &, Matrix<T> &);

template<typename T>
class Matrix
{
private:
    T arr[SIZE][SIZE];
    friend  ostream& operator << <> (ostream &, const Matrix &);
    friend  istream& operator >> <> (istream &, Matrix &);
    void initialize();// функция которая заполняет матрицу как единичную

public:
    Matrix() {}
    Matrix(const Matrix<T>&);
    const Matrix& operator=(const Matrix<T>&);
    const Matrix& operator*(const Matrix<T>&);
    void  operator*=(const Matrix<T> &);
    T* operator[](int row);
};

template< typename T>
ostream & operator<<(ostream & os, const Matrix<T> & rhs)
{
    for (int i(0); i < SIZE; ++i)
    {
        for (int j(0); j < SIZE; ++j)
        {
            os << rhs.arr[i][j] << ' ';
        }
        os << endl;
    }
    return os;
}

template< typename T>
istream & operator>>(istream&  is, Matrix<T> & rhs)
{
    for (int i(0); i < SIZE; ++i)
    {
        for (int j(0); j < SIZE; ++j)
        {
            is >> rhs.arr[i][j];
        }
    }
    return is;
}

int main()
{
	Matrix <int> m;
	ifstream("input.txt") >> m;
	
	return 0;
}