Input data from stream and fix algorithm
Fix algorithm, print matrix after cin