Solve each query in Q
for i in range ( len ( q ) ) : NEW_LINE INDENT id = q [ i ] [ 0 ] NEW_LINE if ( id == 1 ) : NEW_LINE INDENT L = q [ i ] [ 1 ] NEW_LINE R = q [ i ] [ 2 ] NEW_LINE print ( " XOR ▁ of ▁ elements ▁ in ▁ " " given ▁ range ▁ is ▁ " , rangeXor ( BITree , L , R ) ) NEW_LINE DEDENT else : NEW_LINE INDENT idx = q [ i ] [ 1 ] NEW_LINE val = q [ i ] [ 2 ] NEW_LINE A [ idx ] ^= val NEW_LINE DEDENT DEDENT