You are given a matrix of size N×M elements, filled with lowercase ASCII letters from ‘a’ to ‘z’. Find the max size of rectangular contiguous submatrix of unique (i.e. non repeated within a given submatrix) elements. Find all submatrices of unique elements of this size and replace their elements with asterisks ‘*’.
The first argument is a file that contains the input matrix. E.g.
rzqicaiiaege ccwnulljybtu jxtxupauwuah oqikzgqrzpdq vblalwdjbdwn ahjeencuclbo
Print to stdout the result of the matrix with replaced elements, where all elements of the biggest submatrixes of unique elements are replaced with asterisks ‘*’. E.g.
rzqicaiiae** ccwnulljyb** jxtx***uwu** oqik****zp** vbla****bd** ahje****cl**
- The size of matrix in the input is 60×20 elements.