code: function reach (curr, next, reachable) {
    if (!next) return false
    if (!curr) return true
  
    const here = reachable[curr]
    if (!here || !here[next]) return false
    return here[next].length === 1
  }
docs: check if state can reach in reach str, str, obj -> bool