from collections import deque


def SCREAMING_SNAKE_CASE					(  lowercase_:						Optional[Any]					):
       return input(lowercase_					).strip().split(' '					)


def SCREAMING_SNAKE_CASE					(  lowercase_:						int		,    lowercase_:						int					):
       _UpperCamelCase  :							dict[int, list[int]]	    =	{}
       for i in range(lowercase_					):
              _UpperCamelCase  :							List[str]	    =	[]

       for e in range(lowercase_					):
              _UpperCamelCase    ,   _UpperCamelCase  :							Dict	    =	(int(lowercase_					) for i in _input(F"Edge {e + 1}: <node1> <node2> "					))
              graph[x].append(lowercase_					)
       return graph


def SCREAMING_SNAKE_CASE					(  lowercase_:						int		,    lowercase_:						int					):
       _UpperCamelCase  :							dict[int, list[int]]	    =	{}
       for i in range(lowercase_					):
              _UpperCamelCase  :							Optional[Any]	    =	[]

       for e in range(lowercase_					):
              _UpperCamelCase    ,   _UpperCamelCase  :							Tuple	    =	(int(lowercase_					) for i in _input(F"Edge {e + 1}: <node1> <node2> "					))
              graph[x].append(lowercase_					)
              graph[y].append(lowercase_					)
       return graph


def SCREAMING_SNAKE_CASE					(  lowercase_:						int		,    lowercase_:						int					):
       _UpperCamelCase  :							dict[int, list[tuple[int, int]]]	    =	{}
       for i in range(lowercase_					):
              _UpperCamelCase  :							List[Any]	    =	[]

       for e in range(lowercase_					):
              _UpperCamelCase    ,   _UpperCamelCase    ,   _UpperCamelCase  :							Optional[Any]	    =	(int(lowercase_					) for i in _input(F"Edge {e + 1}: <node1> <node2> <weight> "					))
              graph[x].append((y, w)					)
              graph[y].append((x, w)					)
       return graph


if __name__ == "__main__":
 UpperCAmelCase		,       UpperCAmelCase      		=					(int(i) for i in _input('''Number of nodes and edges: '''))

 UpperCAmelCase      		=					int(
     _input(
         '''Press 1 or 2 or 3 \n'''
         '''1. Unweighted directed \n'''
         '''2. Unweighted undirected \n'''
         '''3. Weighted undirected \n'''
     )[0]
 )

 UpperCAmelCase      		=					{
     1: initialize_unweighted_directed_graph,
     2: initialize_unweighted_undirected_graph,
     3: initialize_weighted_undirected_graph,
 }[graph_choice](n, m)


def SCREAMING_SNAKE_CASE					(  lowercase_:						Tuple		,    lowercase_:						Dict					):
       _UpperCamelCase    ,   _UpperCamelCase  :							Dict	    =	{s}, [s]
       print(lowercase_					)
       while _s:
              _UpperCamelCase  :							Union[str, Any]	    =	0
              for i in g[_s[-1]]:
                     if i not in vis:
                            _s.append(lowercase_					)
                            vis.add(lowercase_					)
                            _UpperCamelCase  :							str	    =	1
                            print(lowercase_					)
                            break
              if not flag:
                     _s.pop()


def SCREAMING_SNAKE_CASE					(  lowercase_:						Optional[Any]		,    lowercase_:						str					):
       _UpperCamelCase    ,   _UpperCamelCase  :							Optional[int]	    =	{s}, deque([s]					)
       print(lowercase_					)
       while q:
              _UpperCamelCase  :							int	    =	q.popleft()
              for v in g[u]:
                     if v not in vis:
                            vis.add(lowercase_					)
                            q.append(lowercase_					)
                            print(lowercase_					)


def SCREAMING_SNAKE_CASE					(  lowercase_:						Optional[int]		,    lowercase_:						List[str]					):
       _UpperCamelCase    ,   _UpperCamelCase    ,   _UpperCamelCase  :							str	    =	{s: 0}, set(), {s: 0}
       while True:
              if len(lowercase_					) == len(lowercase_					) - 1:
                     break
              _UpperCamelCase  :							Union[str, Any]	    =	100000
              for i in dist:
                     if i not in known and dist[i] < mini:
                            _UpperCamelCase  :							Any	    =	dist[i]
                            _UpperCamelCase  :							List[Any]	    =	i
              known.add(lowercase_					)
              for v in g[u]:
                     if v[0] not in known and dist[u] + v[1] < dist.get(v[0]		,    100000					):
                            _UpperCamelCase  :							Optional[Any]	    =	dist[u] + v[1]
                            _UpperCamelCase  :							Tuple	    =	u
       for i in dist:
              if i != s:
                     print(dist[i]					)


def SCREAMING_SNAKE_CASE					(  lowercase_:						Optional[int]		,    lowercase_:						Union[str, Any]=None		,    lowercase_:						Union[str, Any]=None					):
       if q is None:
              _UpperCamelCase  :							Any	    =	[1]
       if ind is None:
              _UpperCamelCase  :							Tuple	    =	[0] * (len(lowercase_					) + 1)  # SInce oth Index is ignored
              for u in g:
                     for v in g[u]:
                            ind[v] += 1
              _UpperCamelCase  :							Union[str, Any]	    =	deque()
              for i in g:
                     if ind[i] == 0:
                            q.append(lowercase_					)
       if len(lowercase_					) == 0:
              return
       _UpperCamelCase  :							Optional[Any]	    =	q.popleft()
       print(lowercase_					)
       for w in g[v]:
              ind[w] -= 1
              if ind[w] == 0:
                     q.append(lowercase_					)
       topo(lowercase_		,    lowercase_		,    lowercase_					)


def SCREAMING_SNAKE_CASE					(  ):
       _UpperCamelCase  :							Tuple	    =	input().strip()
       _UpperCamelCase  :							Any	    =	[]
       for _ in range(lowercase_					):
              a.append(map(lowercase_		,    input().strip().split()					)					)
       return a, n


def SCREAMING_SNAKE_CASE					(  lowercase_:						Any					):
       ((_UpperCamelCase)    ,   (_UpperCamelCase))  :							List[Any]	    =	a_and_n
       _UpperCamelCase  :							str	    =	list(lowercase_					)
       _UpperCamelCase  :							Dict	    =	[[0] * n for i in range(lowercase_					)]
       for k in range(lowercase_					):
              for i in range(lowercase_					):
                     for j in range(lowercase_					):
                            if dist[i][j] > dist[i][k] + dist[k][j]:
                                   _UpperCamelCase  :							Any	    =	dist[i][k] + dist[k][j]
                                   _UpperCamelCase  :							Optional[int]	    =	k
       print(lowercase_					)


def SCREAMING_SNAKE_CASE					(  lowercase_:						List[Any]		,    lowercase_:						int					):
       _UpperCamelCase    ,   _UpperCamelCase    ,   _UpperCamelCase  :							int	    =	{s: 0}, set(), {s: 0}
       while True:
              if len(lowercase_					) == len(lowercase_					) - 1:
                     break
              _UpperCamelCase  :							Dict	    =	100000
              for i in dist:
                     if i not in known and dist[i] < mini:
                            _UpperCamelCase  :							Tuple	    =	dist[i]
                            _UpperCamelCase  :							List[Any]	    =	i
              known.add(lowercase_					)
              for v in g[u]:
                     if v[0] not in known and v[1] < dist.get(v[0]		,    100000					):
                            _UpperCamelCase  :							Dict	    =	v[1]
                            _UpperCamelCase  :							Union[str, Any]	    =	u
       return dist


def SCREAMING_SNAKE_CASE					(  ):
       _UpperCamelCase    ,   _UpperCamelCase  :							Any	    =	map(lowercase_		,    input().split(' '					)					)
       _UpperCamelCase  :							List[str]	    =	[]
       for _ in range(lowercase_					):
              edges.append(map(lowercase_		,    input().split(' '					)					)					)
       return edges, n


def SCREAMING_SNAKE_CASE					(  lowercase_:						Tuple					):
       # Sort edges on the basis of distance
       ((_UpperCamelCase)    ,   (_UpperCamelCase))  :							int	    =	e_and_n
       e.sort(reverse=lowercase_		,    key=lambda lowercase_					: x[2]					)
       _UpperCamelCase  :							Dict	    =	[{i} for i in range(1		,    n + 1					)]
       while True:
              if len(lowercase_					) == 1:
                     break
              print(lowercase_					)
              _UpperCamelCase  :							Optional[int]	    =	e.pop()
              for i in range(len(lowercase_					)					):
                     if x[0] in s[i]:
                            break
              for j in range(len(lowercase_					)					):
                     if x[1] in s[j]:
                            if i == j:
                                   break
                            s[j].update(s[i]					)
                            s.pop(lowercase_					)
                            break





def SCREAMING_SNAKE_CASE					(  lowercase_:						List[Any]					):
       _UpperCamelCase  :							Dict	    =	[]
       for node in graph:
              if not graph[node]:
                     isolated.append(lowercase_					)
       return isolated




from collections import OrderedDict
from typing import Mapping

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


UpperCAmelCase      		=					logging.get_logger(__name__)

UpperCAmelCase      		=					{
    '''flaubert/flaubert_small_cased''': '''https://huggingface.co/flaubert/flaubert_small_cased/resolve/main/config.json''',
    '''flaubert/flaubert_base_uncased''': '''https://huggingface.co/flaubert/flaubert_base_uncased/resolve/main/config.json''',
    '''flaubert/flaubert_base_cased''': '''https://huggingface.co/flaubert/flaubert_base_cased/resolve/main/config.json''',
    '''flaubert/flaubert_large_cased''': '''https://huggingface.co/flaubert/flaubert_large_cased/resolve/main/config.json''',
}




class  __lowerCAmelCase	(							a_    ):



 '''simple docstring'''
 _lowerCamelCase    :						List[Any]					     =			'flaubert'
 _lowerCamelCase    :						List[str]					     =			{
     'hidden_size': 'emb_dim',
     'num_attention_heads': 'n_heads',
     'num_hidden_layers': 'n_layers',
     'n_words': 'vocab_size',  # For backward compatibility
 }

 def __init__(      self							:		List[Any]							,      lowerCamelCase							:		Tuple=False							,      lowerCamelCase							:		str=0.0							,      lowerCamelCase							:		int=3_0_1_4_5							,      lowerCamelCase							:		List[str]=2_0_4_8							,      lowerCamelCase							:		List[str]=1_2							,      lowerCamelCase							:		Dict=1_6							,      lowerCamelCase							:		Any=0.1							,      lowerCamelCase							:		List[str]=0.1							,      lowerCamelCase							:		List[str]=True							,      lowerCamelCase							:		Any=False							,      lowerCamelCase							:		Optional[int]=False							,      lowerCamelCase							:		int=False							,      lowerCamelCase							:		Optional[Any]=1							,      lowerCamelCase							:		int=True							,      lowerCamelCase							:		str=5_1_2							,      lowerCamelCase							:		Tuple=2_0_4_8**-0.5							,      lowerCamelCase							:		str=1e-12							,      lowerCamelCase							:		Any=0.0_2							,      lowerCamelCase							:		Dict=0							,      lowerCamelCase							:		Union[str, Any]=1							,      lowerCamelCase							:		List[Any]=2							,      lowerCamelCase							:		Union[str, Any]=3							,      lowerCamelCase							:		List[Any]=5							,      lowerCamelCase							:		int=True							,      lowerCamelCase							:		Dict="first"							,      lowerCamelCase							:		Optional[int]=True							,      lowerCamelCase							:		Any=None							,      lowerCamelCase							:		Optional[int]=True							,      lowerCamelCase							:		List[str]=0.1							,      lowerCamelCase							:		List[Any]=5							,      lowerCamelCase							:		Optional[Any]=5							,      lowerCamelCase							:		str=0							,      lowerCamelCase							:		Optional[int]=0							,      lowerCamelCase							:		List[str]=2							,      lowerCamelCase							:		Any=0							,      **lowerCamelCase							:		Tuple							,      )			->				Any:
        _UpperCamelCase  :							Optional[Any]	    =	pre_norm
        _UpperCamelCase  :							Optional[int]	    =	layerdrop
        _UpperCamelCase  :							Dict	    =	vocab_size
        _UpperCamelCase  :							Dict	    =	emb_dim
        _UpperCamelCase  :							int	    =	n_layers
        _UpperCamelCase  :							Tuple	    =	n_heads
        _UpperCamelCase  :							Tuple	    =	dropout
        _UpperCamelCase  :							Any	    =	attention_dropout
        _UpperCamelCase  :							Union[str, Any]	    =	gelu_activation
        _UpperCamelCase  :							Dict	    =	sinusoidal_embeddings
        _UpperCamelCase  :							str	    =	causal
        _UpperCamelCase  :							str	    =	asm
        _UpperCamelCase  :							Tuple	    =	n_langs
        _UpperCamelCase  :							Optional[int]	    =	use_lang_emb
        _UpperCamelCase  :							Optional[Any]	    =	layer_norm_eps
        _UpperCamelCase  :							Optional[Any]	    =	bos_index
        _UpperCamelCase  :							Dict	    =	eos_index
        _UpperCamelCase  :							Union[str, Any]	    =	pad_index
        _UpperCamelCase  :							Union[str, Any]	    =	unk_index
        _UpperCamelCase  :							Optional[Any]	    =	mask_index
        _UpperCamelCase  :							Any	    =	is_encoder
        _UpperCamelCase  :							List[str]	    =	max_position_embeddings
        _UpperCamelCase  :							Union[str, Any]	    =	embed_init_std
        _UpperCamelCase  :							Optional[int]	    =	init_std
        _UpperCamelCase  :							Any	    =	summary_type
        _UpperCamelCase  :							Any	    =	summary_use_proj
        _UpperCamelCase  :							Optional[int]	    =	summary_activation
        _UpperCamelCase  :							Union[str, Any]	    =	summary_proj_to_labels
        _UpperCamelCase  :							Dict	    =	summary_first_dropout
        _UpperCamelCase  :							Union[str, Any]	    =	start_n_top
        _UpperCamelCase  :							Any	    =	end_n_top
        _UpperCamelCase  :							List[Any]	    =	mask_token_id
        _UpperCamelCase  :							str	    =	lang_id

        if "n_words" in kwargs:
               _UpperCamelCase  :							Tuple	    =	kwargs['n_words']

        super().__init__(pad_token_id=lowerCamelCase							,      bos_token_id=lowerCamelCase							,      **lowerCamelCase	)







class  __lowerCAmelCase	(							a_    ):



 '''simple docstring'''

 @property
 def        __snake_case       (      self							:		str	)			->				Mapping[str, Mapping[int, str]]:
        if self.task == "multiple-choice":
               _UpperCamelCase  :							int	    =	{0: 'batch', 1: 'choice', 2: 'sequence'}
        else:
               _UpperCamelCase  :							Dict	    =	{0: 'batch', 1: 'sequence'}
        return OrderedDict(
            [
                ('input_ids', dynamic_axis),
                ('attention_mask', dynamic_axis),
            ]	)



