Update matrix diagonal print
Add string serialization and deserialization