Python implementation of the above approach
from typing import List NEW_LINE class Query : NEW_LINE INDENT def __init__ ( self ) -> None : NEW_LINE INDENT self . l = 0 NEW_LINE self . r = 0 NEW_LINE self . x = 0 NEW_LINE self . index = 0 NEW_LINE DEDENT DEDENT class Arrays : NEW_LINE INDENT def __init__ ( self ) -> None : NEW_LINE INDENT self . val = 0 NEW_LINE self . index = 0 NEW_LINE DEDENT DEDENT