laern to write a system