Please write a read method in Matrix class