public   void makePath(Level[]maze,TermQ answer)
        {
	  boolean [][][]lastPath= new boolean[10][][];
    for(int l=0;l<maze.length;l++){
    	if(maze[l]!=null){
    lastPath[l]=new boolean[maze[l].getLevel().length][maze[l].getLevel().length];
    	}
    }
          if(answer!=null){
            while(answer!=null){
       
            	   if(s.isEmpty()||s.top()!=(Integer)answer.level){
    	  s.push(answer.level);
      }
               //    if(maze[answer.level].getLevel()[answer.positionI][answer.positionJ]==' '||maze[answer.level].getLevel()[answer.positionI][answer.positionJ]=='r'){
                lastPath[answer.level][answer.positionI][answer.positionJ]=true;
             //   }


answer=answer.getParent();
            }
            }
          this.setPath(lastPath);
        }