Push the element to container and hash the L and R
for i in range ( n ) : NEW_LINE INDENT v . append ( a [ i ] [ 0 ] ) NEW_LINE mpp [ a [ i ] [ 0 ] ] = 1 NEW_LINE v . append ( a [ i ] [ 1 ] ) NEW_LINE mpp [ a [ i ] [ 1 ] ] = 2 NEW_LINE DEDENT