def get_node_label(literal, n):
    """node label 1, 2, ..., n for literal 1, 2, ..., n
    nodel label n+1, n+2, ..., 2n for literal -1, -2, ..., -n
    """
    if literal > 0:
        return literal
    else:
        return (- literal + n)