content: import java.util.ArrayList;
  import java.util.HashMap;
  import java.util.List;
  import java.util.Map;
  import java.util.Objects;
  
  public class SgfNode {
  
      private Map<String, List<String>> properties;
      private List<SgfNode> children;
  
      public SgfNode() {
          properties = new HashMap<>();
          children = new ArrayList<>();
      }
  
      public SgfNode(Map<String, List<String>> properties) {
          this.properties = properties;
          children = new ArrayList<>();
      }
  
      public SgfNode(Map<String, List<String>> properties, List<SgfNode> children) {
          this.properties = properties;
          this.children = children;
      }
  
      @Override
      public boolean equals(Object o) {
          if (this == o) {
              return true;
          }
          if (o == null || getClass() != o.getClass()) {
              return false;
          }
          SgfNode sgfNode = (SgfNode) o;
          return properties.equals(sgfNode.properties) && children.equals(sgfNode.children);
      }
  
      @Override
      public int hashCode() {
          return Objects.hash(properties, children);
      }
  
      @Override
      public String toString() {
          return "SgfNode{" +
                 "properties=" + properties +
                 ", children=" + children +
                 '}';
      }
  
      public void appendChild(SgfNode node) {
          children.add(node);
      }
  
      public void setProperties(Map<String, List<String>> properties) {
          this.properties = properties;
      }
  
  }
  