

from collections import deque







def 	lowerCamelCase__			(   __A						:Optional[int]		)     ->   Optional[int]:


       """simple docstring"""




       return input(__A		).strip().split(""" """		)







def 	lowerCamelCase__			(   __A						:int  ,__A						:int		)     ->   Optional[Any]:


       """simple docstring"""




       __snake_case					  =       {}
       for i in range(__A		):
              __snake_case					  =       []

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







def 	lowerCamelCase__			(   __A						:int  ,__A						:int		)     ->   List[str]:


       """simple docstring"""




       __snake_case					  =       {}
       for i in range(__A		):
              __snake_case					  =       []

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







def 	lowerCamelCase__			(   __A						:int  ,__A						:int		)     ->   List[Any]:


       """simple docstring"""




       __snake_case					  =       {}
       for i in range(__A		):
              __snake_case					  =       []

       for e in range(__A		):
              __snake_case  ,						__snake_case  ,						__snake_case					  =       (int(__A		) 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 	lowerCamelCase__			(   __A						:Tuple  ,__A						:str		)     ->   List[str]:


       """simple docstring"""




       __snake_case  ,						__snake_case					  =       {s}, [s]
       print(__A		)
       while _s:
              __snake_case					  =       0
              for i in g[_s[-1]]:
                     if i not in vis:
                            _s.append(__A		)
                            vis.add(__A		)
                            __snake_case					  =       1
                            print(__A		)
                            break
              if not flag:
                     _s.pop()







def 	lowerCamelCase__			(   __A						:Any  ,__A						:Optional[int]		)     ->   Dict:


       """simple docstring"""




       __snake_case  ,						__snake_case					  =       {s}, deque([s]		)
       print(__A		)
       while q:
              __snake_case					  =       q.popleft()
              for v in g[u]:
                     if v not in vis:
                            vis.add(__A		)
                            q.append(__A		)
                            print(__A		)







def 	lowerCamelCase__			(   __A						:Optional[int]  ,__A						:Optional[Any]		)     ->   List[str]:


       """simple docstring"""




       __snake_case  ,						__snake_case  ,						__snake_case					  =       {s: 0}, set(), {s: 0}
       while True:
              if len(__A		) == len(__A		) - 1:
                     break
              __snake_case					  =       1_0_0_0_0_0
              for i in dist:
                     if i not in known and dist[i] < mini:
                            __snake_case					  =       dist[i]
                            __snake_case					  =       i
              known.add(__A		)
              for v in g[u]:
                     if v[0] not in known and dist[u] + v[1] < dist.get(v[0]  ,1_0_0_0_0_0		):
                            __snake_case					  =       dist[u] + v[1]
                            __snake_case					  =       u
       for i in dist:
              if i != s:
                     print(dist[i]		)







def 	lowerCamelCase__			(   __A						:Tuple  ,__A						:Any=None  ,__A						:Optional[int]=None		)     ->   int:


       """simple docstring"""




       if q is None:
              __snake_case					  =       [1]
       if ind is None:
              __snake_case					  =       [0] * (len(__A		) + 1)  # SInce oth Index is ignored
              for u in g:
                     for v in g[u]:
                            ind[v] += 1
              __snake_case					  =       deque()
              for i in g:
                     if ind[i] == 0:
                            q.append(__A		)
       if len(__A		) == 0:
              return
       __snake_case					  =       q.popleft()
       print(__A		)
       for w in g[v]:
              ind[w] -= 1
              if ind[w] == 0:
                     q.append(__A		)
       topo(__A  ,__A  ,__A		)







def 	lowerCamelCase__			(   )     ->   Dict:


       """simple docstring"""




       __snake_case					  =       input().strip()
       __snake_case					  =       []
       for _ in range(__A		):
              a.append(map(__A  ,input().strip().split()		)		)
       return a, n







def 	lowerCamelCase__			(   __A						:List[str]		)     ->   str:


       """simple docstring"""




       ((__snake_case)  ,						(__snake_case))					  =       a_and_n
       __snake_case					  =       list(__A		)
       __snake_case					  =       [[0] * n for i in range(__A		)]
       for k in range(__A		):
              for i in range(__A		):
                     for j in range(__A		):
                            if dist[i][j] > dist[i][k] + dist[k][j]:
                                   __snake_case					  =       dist[i][k] + dist[k][j]
                                   __snake_case					  =       k
       print(__A		)







def 	lowerCamelCase__			(   __A						:Any  ,__A						:Tuple		)     ->   List[str]:


       """simple docstring"""




       __snake_case  ,						__snake_case  ,						__snake_case					  =       {s: 0}, set(), {s: 0}
       while True:
              if len(__A		) == len(__A		) - 1:
                     break
              __snake_case					  =       1_0_0_0_0_0
              for i in dist:
                     if i not in known and dist[i] < mini:
                            __snake_case					  =       dist[i]
                            __snake_case					  =       i
              known.add(__A		)
              for v in g[u]:
                     if v[0] not in known and v[1] < dist.get(v[0]  ,1_0_0_0_0_0		):
                            __snake_case					  =       v[1]
                            __snake_case					  =       u
       return dist







def 	lowerCamelCase__			(   )     ->   int:


       """simple docstring"""




       __snake_case  ,						__snake_case					  =       map(__A  ,input().split(""" """		)		)
       __snake_case					  =       []
       for _ in range(__A		):
              edges.append(map(__A  ,input().split(""" """		)		)		)
       return edges, n







def 	lowerCamelCase__			(   __A						:List[str]		)     ->   Dict:


       """simple docstring"""




       ((__snake_case)  ,						(__snake_case))					  =       e_and_n
       e.sort(reverse=__A  ,key=lambda __A		: x[2]		)
       __snake_case					  =       [{i} for i in range(1  ,n + 1		)]
       while True:
              if len(__A		) == 1:
                     break
              print(__A		)
              __snake_case					  =       e.pop()
              for i in range(len(__A		)		):
                     if x[0] in s[i]:
                            break
              for j in range(len(__A		)		):
                     if x[1] in s[j]:
                            if i == j:
                                   break
                            s[j].update(s[i]		)
                            s.pop(__A		)
                            break







def 	lowerCamelCase__			(   __A						:List[Any]		)     ->   Dict:


       """simple docstring"""




       __snake_case					  =       []
       for node in graph:
              if not graph[node]:
                     isolated.append(__A		)
       return isolated




import functools
import operator

from ...configuration_utils import PretrainedConfig
from ...utils import logging


UpperCamelCase__		   =    logging.get_logger(__name__)

UpperCamelCase__		   =    {
    '''facebook/hubert-base-ls960''': '''https://huggingface.co/facebook/hubert-base-ls960/resolve/main/config.json''',
    # See all Hubert models at https://huggingface.co/models?filter=hubert
}

class 						__snake_case						(							snake_case__     ):
       """simple docstring"""







       __SCREAMING_SNAKE_CASE													=       "hubert"


       def __init__(		self			,   _UpperCamelCase=32			,   _UpperCamelCase=7_68			,   _UpperCamelCase=12			,   _UpperCamelCase=12			,   _UpperCamelCase=30_72			,   _UpperCamelCase="gelu"			,   _UpperCamelCase=0.1			,   _UpperCamelCase=0.1			,   _UpperCamelCase=0.1			,   _UpperCamelCase=True			,   _UpperCamelCase=0.0			,   _UpperCamelCase=0.1			,   _UpperCamelCase=0.1			,   _UpperCamelCase=0.02			,   _UpperCamelCase=1E-5			,   _UpperCamelCase="group"			,   _UpperCamelCase="gelu"			,   _UpperCamelCase=(5_12, 5_12, 5_12, 5_12, 5_12, 5_12, 5_12)			,   _UpperCamelCase=(5, 2, 2, 2, 2, 2, 2)			,   _UpperCamelCase=(10, 3, 3, 3, 3, 2, 2)			,   _UpperCamelCase=False			,   _UpperCamelCase=1_28			,   _UpperCamelCase=16			,   _UpperCamelCase=False			,   _UpperCamelCase=True			,   _UpperCamelCase=0.05			,   _UpperCamelCase=10			,   _UpperCamelCase=2			,   _UpperCamelCase=0.0			,   _UpperCamelCase=10			,   _UpperCamelCase=0			,   _UpperCamelCase="sum"			,   _UpperCamelCase=False			,   _UpperCamelCase=False			,   _UpperCamelCase=2_56			,   _UpperCamelCase=0			,   _UpperCamelCase=1			,   _UpperCamelCase=2			,   **_UpperCamelCase			,   )			->       Any:






              """simple docstring"""


              super().__init__(**_UpperCamelCase			,   pad_token_id=_UpperCamelCase			,   bos_token_id=_UpperCamelCase			,   eos_token_id=_UpperCamelCase      )
              __snake_case					  =       hidden_size
              __snake_case					  =       feat_extract_norm
              __snake_case					  =       feat_extract_activation
              __snake_case					  =       list(_UpperCamelCase      )
              __snake_case					  =       list(_UpperCamelCase      )
              __snake_case					  =       list(_UpperCamelCase      )
              __snake_case					  =       conv_bias
              __snake_case					  =       num_conv_pos_embeddings
              __snake_case					  =       num_conv_pos_embedding_groups
              __snake_case					  =       len(self.conv_dim      )
              __snake_case					  =       num_hidden_layers
              __snake_case					  =       intermediate_size
              __snake_case					  =       hidden_act
              __snake_case					  =       num_attention_heads
              __snake_case					  =       hidden_dropout
              __snake_case					  =       attention_dropout
              __snake_case					  =       activation_dropout
              __snake_case					  =       feat_proj_layer_norm
              __snake_case					  =       feat_proj_dropout
              __snake_case					  =       final_dropout
              __snake_case					  =       layerdrop
              __snake_case					  =       layer_norm_eps
              __snake_case					  =       initializer_range
              __snake_case					  =       vocab_size
              __snake_case					  =       do_stable_layer_norm
              __snake_case					  =       use_weighted_layer_sum
              __snake_case					  =       classifier_proj_size

              if (
                  (len(self.conv_stride      ) != self.num_feat_extract_layers)
                  or (len(self.conv_kernel      ) != self.num_feat_extract_layers)
                  or (len(self.conv_dim      ) != self.num_feat_extract_layers)
              ):
                     raise ValueError(
                         """Configuration for convolutional layers is incorrect. It is required that `len(config.conv_dim)` =="""
                         """ `len(config.conv_stride)` == `len(config.conv_kernel)`, but is `len(config.conv_dim) ="""
                         F' {len(self.conv_dim      )}`, `len(config.conv_stride) = {len(self.conv_stride      )}`,'
                         F' `len(config.conv_kernel) = {len(self.conv_kernel      )}`.'      )

              # fine-tuning config parameters for SpecAugment: https://arxiv.org/abs/1904.08779
              __snake_case					  =       apply_spec_augment
              __snake_case					  =       mask_time_prob
              __snake_case					  =       mask_time_length
              __snake_case					  =       mask_time_min_masks
              __snake_case					  =       mask_feature_prob
              __snake_case					  =       mask_feature_length
              __snake_case					  =       mask_feature_min_masks

              # ctc loss
              __snake_case					  =       ctc_loss_reduction
              __snake_case					  =       ctc_zero_infinity






       @property
       def  a		(		self      )			->       Union[str, Any]:






              """simple docstring"""


              return functools.reduce(operator.mul			,   self.conv_stride			,   1      )

