Softwire interview question

Navigation through maze using some simple commands