

def      A__					(			__A  :						list[int]     ,				__A  :						list[int]			)					->None:
      __A    =len(__A			)
      print('''The following activities are selected:'''			)

      # The first activity is always selected
      __A    =0
      print(__A     ,				end=''','''			)

      # Consider rest of the activities
      for j in range(__A			):
            # If this activity has start time greater than
            # or equal to the finish time of previously
            # selected activity, then select it
            if start[j] >= finish[i]:
                  print(__A     ,				end=''','''			)
                  __A    =j


if __name__ == "__main__":
   import doctest

   doctest.testmod()

   _lowerCamelCase      :					Optional[Any]					    =      [1, 3, 0, 5, 8, 5]
   _lowerCamelCase      :					Tuple					    =      [2, 4, 6, 7, 9, 9]
   print_max_activities(start, finish)





def      A__					(			__A  :						str     ,				__A  :						str			)					->str:

      if not (isinstance(__A     ,				__A			) and isinstance(__A     ,				__A			)):
            raise ValueError('''longest_common_substring() takes two strings for inputs'''			)

      __A    =len(__A			)
      __A    =len(__A			)

      __A    =[[0] * (texta_length + 1) for _ in range(texta_length + 1			)]
      __A    =0
      __A    =0

      for i in range(1     ,				texta_length + 1			):
            for j in range(1     ,				texta_length + 1			):
                  if texta[i - 1] == texta[j - 1]:
                        __A    =1 + dp[i - 1][j - 1]
                        if dp[i][j] > ans_length:
                              __A    =i
                              __A    =dp[i][j]

      return texta[ans_index - ans_length : ans_index]


if __name__ == "__main__":
   import doctest

   doctest.testmod()


