
"""simple docstring"""

from __future__ import annotations

import math

class __lowerCAmelCase	:





     def __init__(			self			,  __UpperCAmelCase   ):

      '''simple docstring'''




      __UpperCamelCase       						= size
      # approximate the overall size of segment tree with given value
      __UpperCamelCase       						= [0 for i in range(0			,  4 * size   )]
      # create array to store lazy update
      __UpperCamelCase       						= [0 for i in range(0			,  4 * size   )]
      __UpperCamelCase       						= [0 for i in range(0			,  4 * size   )]  # flag for lazy update





     def 		UpperCAmelCase      (			self			,  __UpperCAmelCase   ):

      '''simple docstring'''




      return idx * 2





     def 		UpperCAmelCase      (			self			,  __UpperCAmelCase   ):

      '''simple docstring'''




      return idx * 2 + 1





     def 		UpperCAmelCase      (			self			,  __UpperCAmelCase			,  __UpperCAmelCase			,  __UpperCAmelCase			,  __UpperCAmelCase   ):

      '''simple docstring'''




      if left_element == right_element:
       __UpperCamelCase       						= a[left_element - 1]
      else:
       __UpperCamelCase       						= (left_element + right_element) // 2
       self.build(self.left(__UpperCAmelCase   )			,  __UpperCAmelCase			,  __UpperCAmelCase			,  __UpperCAmelCase   )
       self.build(self.right(__UpperCAmelCase   )			,  mid + 1			,  __UpperCAmelCase			,  __UpperCAmelCase   )
       __UpperCamelCase       						= max(
           self.segment_tree[self.left(__UpperCAmelCase   )]			,  self.segment_tree[self.right(__UpperCAmelCase   )]   )





     def 		UpperCAmelCase      (			self			,  __UpperCAmelCase			,  __UpperCAmelCase			,  __UpperCAmelCase			,  __UpperCAmelCase			,  __UpperCAmelCase			,  __UpperCAmelCase   ):

      '''simple docstring'''




      if self.flag[idx] is True:
       __UpperCamelCase       						= self.lazy[idx]
       __UpperCamelCase       						= False
       if left_element != right_element:
        __UpperCamelCase       						= self.lazy[idx]
        __UpperCamelCase       						= self.lazy[idx]
        __UpperCamelCase       						= True
        __UpperCamelCase       						= True

      if right_element < a or left_element > b:
       return True
      if left_element >= a and right_element <= b:
       __UpperCamelCase       						= val
       if left_element != right_element:
        __UpperCamelCase       						= val
        __UpperCamelCase       						= val
        __UpperCamelCase       						= True
        __UpperCamelCase       						= True
       return True
      __UpperCamelCase       						= (left_element + right_element) // 2
      self.update(self.left(__UpperCAmelCase   )			,  __UpperCAmelCase			,  __UpperCAmelCase			,  __UpperCAmelCase			,  __UpperCAmelCase			,  __UpperCAmelCase   )
      self.update(self.right(__UpperCAmelCase   )			,  mid + 1			,  __UpperCAmelCase			,  __UpperCAmelCase			,  __UpperCAmelCase			,  __UpperCAmelCase   )
      __UpperCamelCase       						= max(
          self.segment_tree[self.left(__UpperCAmelCase   )]			,  self.segment_tree[self.right(__UpperCAmelCase   )]   )
      return True





     def 		UpperCAmelCase      (			self			,  __UpperCAmelCase			,  __UpperCAmelCase			,  __UpperCAmelCase			,  __UpperCAmelCase			,  __UpperCAmelCase   ):

      '''simple docstring'''




      if self.flag[idx] is True:
       __UpperCamelCase       						= self.lazy[idx]
       __UpperCamelCase       						= False
       if left_element != right_element:
        __UpperCamelCase       						= self.lazy[idx]
        __UpperCamelCase       						= self.lazy[idx]
        __UpperCamelCase       						= True
        __UpperCamelCase       						= True
      if right_element < a or left_element > b:
       return -math.inf
      if left_element >= a and right_element <= b:
       return self.segment_tree[idx]
      __UpperCamelCase       						= (left_element + right_element) // 2
      __UpperCamelCase       						= self.query(self.left(__UpperCAmelCase   )			,  __UpperCAmelCase			,  __UpperCAmelCase			,  __UpperCAmelCase			,  __UpperCAmelCase   )
      __UpperCamelCase       						= self.query(self.right(__UpperCAmelCase   )			,  mid + 1			,  __UpperCAmelCase			,  __UpperCAmelCase			,  __UpperCAmelCase   )
      return max(__UpperCAmelCase			,  __UpperCAmelCase   )







     def __str__(			self   ):

      '''simple docstring'''




      return str([self.query(1			,  1			,  self.size			,  __UpperCAmelCase			,  __UpperCAmelCase   ) for i in range(1			,  self.size + 1   )]   )


if __name__ == "__main__":
      UpperCamelCase			:       Optional[Any]									=				[1, 2, -4, 7, 3, -5, 6, 1_1, -2_0, 9, 1_4, 1_5, 5, 2, -8]
      UpperCamelCase			:       Dict									=				1_5
      UpperCamelCase			:       int									=				SegmentTree(size)
      segt.build(1, 1, size, A)
      print(segt.query(1, 1, size, 4, 6))
      print(segt.query(1, 1, size, 7, 1_1))
      print(segt.query(1, 1, size, 7, 1_2))
      segt.update(1, 1, size, 1, 3, 1_1_1)
      print(segt.query(1, 1, size, 1, 1_5))
      segt.update(1, 1, size, 7, 8, 2_3_5)
      print(segt)





"""simple docstring"""

from __future__ import annotations

import os
from typing import Any

import requests

UpperCamelCase			:       Union[str, Any]									=				"https://api.github.com"

# https://docs.github.com/en/free-pro-team@latest/rest/reference/users#get-the-authenticated-user
UpperCamelCase			:       Union[str, Any]									=				BASE_URL + "/user"

# https://github.com/settings/tokens
UpperCamelCase			:       Optional[int]									=				os.environ.get("USER_TOKEN", "")






def 							A		(       snake_case   :str	)   ->			dict[Any, Any]:
 __UpperCamelCase       						= {
     'Authorization': f'token {auth_token}',
     'Accept': 'application/vnd.github.v3+json',
 }
 return requests.get(snake_case       ,      headers=snake_case	).json()


if __name__ == "__main__":  # pragma: no cover
      if USER_TOKEN:
            for key, value in fetch_github_info(USER_TOKEN).items():
                  print(f'''{key}: {value}''')
      else:
            raise ValueError("'USER_TOKEN' field cannot be empty.")



