
"""simple docstring"""






from typing import Mapping

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxSeqaSeqConfigWithPast
from ...utils import logging


__UpperCAmelCase 					=    logging.get_logger(__name__)

__UpperCAmelCase 					=    {
    "google/long-t5-local-base": "https://huggingface.co/google/long-t5-local-base/blob/main/config.json",
    "google/long-t5-local-large": "https://huggingface.co/google/long-t5-local-large/blob/main/config.json",
    "google/long-t5-tglobal-base": "https://huggingface.co/google/long-t5-tglobal-base/blob/main/config.json",
    "google/long-t5-tglobal-large": "https://huggingface.co/google/long-t5-tglobal-large/blob/main/config.json",
}




class      _SCREAMING_SNAKE_CASE   (     __SCREAMING_SNAKE_CASE				):
			UpperCAmelCase_    :Union[str, Any]												=		"longt5"
			UpperCAmelCase_    :int												=		["past_key_values"]
			UpperCAmelCase_    :Tuple												=		{"hidden_size": "d_model", "num_attention_heads": "num_heads", "num_hidden_layers": "num_layers"}






			def __init__(   self			,  __A=3_2128			,  __A=512			,  __A=64			,  __A=2048			,  __A=6			,  __A=None			,  __A=8			,  __A=127			,  __A=16			,  __A=32			,  __A=128			,  __A=0.1			,  __A=1E-6			,  __A=1.0			,  __A="relu"			,  __A=True			,  __A="local"			,  __A=True			,  __A=0			,  __A=1			,  **__A			,  )     ->	Optional[Any]:
						lowerCAmelCase_       :Optional[int]     	=    vocab_size
						lowerCAmelCase_       :List[Any]     	=    d_model
						lowerCAmelCase_       :Optional[int]     	=    d_kv
						lowerCAmelCase_       :List[str]     	=    d_ff
						lowerCAmelCase_       :List[Any]     	=    num_layers
						# default = symmetry
						lowerCAmelCase_       :str     	=    num_decoder_layers if num_decoder_layers is not None else self.num_layers
						lowerCAmelCase_       :Union[str, Any]     	=    num_heads
						lowerCAmelCase_       :str     	=    local_radius
						lowerCAmelCase_       :Optional[Any]     	=    global_block_size
						lowerCAmelCase_       :Optional[Any]     	=    relative_attention_num_buckets
						lowerCAmelCase_       :Optional[Any]     	=    relative_attention_max_distance
						lowerCAmelCase_       :Optional[Any]     	=    dropout_rate
						lowerCAmelCase_       :int     	=    layer_norm_epsilon
						lowerCAmelCase_       :str     	=    initializer_factor
						lowerCAmelCase_       :Optional[Any]     	=    feed_forward_proj
						lowerCAmelCase_       :Optional[int]     	=    encoder_attention_type
						lowerCAmelCase_       :List[str]     	=    use_cache

						lowerCAmelCase_       :Union[str, Any]     	=    self.feed_forward_proj.split("""-"""			)
						lowerCAmelCase_       :List[str]     	=    act_info[-1]
						lowerCAmelCase_       :int     	=    act_info[0] == """gated"""

						if len(__UpperCAmelCase			) > 1 and act_info[0] != "gated" or len(__UpperCAmelCase			) > 2:
									raise ValueError(
									    f"""`feed_forward_proj`: {feed_forward_proj} is not a valid activation function of the dense layer."""
									    """Please make sure `feed_forward_proj` is of the format `gated-{ACT_FN}` or `{ACT_FN}`, e.g. """
									    """\'gated-gelu\' or \'relu\'"""			)

						# for backwards compatibility
						if feed_forward_proj == "gated-gelu":
									lowerCAmelCase_       :Dict     	=    """gelu_new"""

						super().__init__(
						    pad_token_id=__UpperCAmelCase			,  eos_token_id=__UpperCAmelCase			,  is_encoder_decoder=__UpperCAmelCase			,  **__UpperCAmelCase			,  )




class      _SCREAMING_SNAKE_CASE   (     __SCREAMING_SNAKE_CASE				):






			@property
			def 					__lowerCAmelCase					(   self			)     ->	int:
						lowerCAmelCase_       :Union[str, Any]     	=    {
						    """input_ids""": {0: """batch""", 1: """encoder_sequence"""},
						    """attention_mask""": {0: """batch""", 1: """encoder_sequence"""},
						}
						if self.use_past:
									lowerCAmelCase_       :int     	=    """past_encoder_sequence + sequence"""
									lowerCAmelCase_       :List[Any]     	=    {0: """batch"""}
									lowerCAmelCase_       :Optional[Any]     	=    {0: """batch""", 1: """past_decoder_sequence + sequence"""}
						else:
									lowerCAmelCase_       :str     	=    {0: """batch""", 1: """decoder_sequence"""}
									lowerCAmelCase_       :int     	=    {0: """batch""", 1: """decoder_sequence"""}

						if self.use_past:
									self.fill_with_past_key_values_(__UpperCAmelCase			,  direction="""inputs"""			)

						return common_inputs






			@property
			def 					__lowerCAmelCase					(   self			)     ->	List[str]:
						return 13








"""simple docstring"""

import math
from itertools import permutations






def 				A		(							snake_case :int						) ->      bool:

 if 1 < number < 4:
  # 2 and 3 are primes
  return True
 elif number < 2 or number % 2 == 0 or number % 3 == 0:
  # Negatives, 0, 1, all even numbers, all multiples of 3 are not primes
  return False

 # All primes number are in format of 6k +/- 1
 for i in range(5							,   int(math.sqrt(snake_case						) + 1						)							,   6						):
  if number % i == 0 or number % (i + 2) == 0:
   return False
 return True






def 				A		(							snake_case :int							,   snake_case :list						) ->      bool:
 __UpperCamelCase    ,      __UpperCamelCase							    =			0, len(snake_case						) - 1
 while left <= right:
  __UpperCamelCase							    =			(left + right) // 2
  if prime_list[middle] == target:
   return True
  elif prime_list[middle] < target:
   __UpperCamelCase							    =			middle + 1
  else:
   __UpperCamelCase							    =			middle - 1

 return False






def 				A		(							) ->      int:
 __UpperCamelCase							    =			[n for n in range(1_0_0_1							,   1_0_0_0_0							,   2						) if is_prime(snake_case						)]
 __UpperCamelCase							    =			[]

 for number in prime_list:
  __UpperCamelCase							    =			[]

  for prime_member in permutations(list(str(snake_case						)						)						):
   __UpperCamelCase							    =			int(''.join(snake_case						)						)

   if prime % 2 == 0:
    continue

   if search(snake_case							,   snake_case						):
    tmp_numbers.append(snake_case						)

  tmp_numbers.sort()
  if len(snake_case						) >= 3:
   candidates.append(snake_case						)

 __UpperCamelCase							    =			[]
 for candidate in candidates:
  __UpperCamelCase							    =			len(snake_case						)
  __UpperCamelCase							    =			False

  for i in range(snake_case						):
   for j in range(i + 1							,   snake_case						):
    for k in range(j + 1							,   snake_case						):
     if (
         abs(candidate[i] - candidate[j]						)
         == abs(candidate[j] - candidate[k]						)
         and len({candidate[i], candidate[j], candidate[k]}						) == 3
     ):
      passed.append(
          sorted([candidate[i], candidate[j], candidate[k]]						)						)
      __UpperCamelCase							    =			True

     if found:
      break
    if found:
     break
   if found:
    break

 __UpperCamelCase							    =			set()
 for seq in passed:
  answer.add(''.join([str(snake_case						) for i in seq]						)						)

 return max(int(snake_case						) for x in answer						)


if __name__ == "__main__":
      print(solution())



