Class project. Implementation of TreeNash