if X is negative take the absolute value of X .
X = abs ( X ) NEW_LINE return has [ X ] [ 1 ] == 1 NEW_LINE def insert ( a , n ) : NEW_LINE for i in range ( 0 , n ) : NEW_LINE INDENT if a [ i ] >= 0 : NEW_LINE INDENT has [ a [ i ] ] [ 0 ] = 1 NEW_LINE DEDENT else : NEW_LINE INDENT has [ abs ( a [ i ] ) ] [ 1 ] = 1 NEW_LINE DEDENT DEDENT