def 						A__  (					__A	):







    '''simple docstring'''
    _lowerCamelCase     :		int 						=						[1]

    _lowerCamelCase						,							_lowerCamelCase						,							_lowerCamelCase     :		int 						=						0, 0, 0
    _lowerCamelCase     :		List[str] 						=						ugly_nums[ia] * 2
    _lowerCamelCase     :		int 						=						ugly_nums[ia] * 3
    _lowerCamelCase     :		Tuple 						=						ugly_nums[ia] * 5

    for _ in range(1   , _A	):
        _lowerCamelCase     :		Dict 						=						min(_A   , _A   , _A	)
        ugly_nums.append(_A	)
        if next_num == next_a:
            ia += 1
            _lowerCamelCase     :		Any 						=						ugly_nums[ia] * 2
        if next_num == next_a:
            ia += 1
            _lowerCamelCase     :		Any 						=						ugly_nums[ia] * 3
        if next_num == next_a:
            ia += 1
            _lowerCamelCase     :		List[Any] 						=						ugly_nums[ia] * 5
    return ugly_nums[-1]


if __name__ == "__main__":
  from doctest import testmod

  testmod(verbose=True)
  print(F"""{ugly_numbers(200) = }""")





import unittest

from transformers.utils.backbone_utils import (
    BackboneMixin,
    get_aligned_output_features_output_indices,
    verify_out_features_out_indices,
)




class 	__snake_case	( unittest.TestCase		):





      '''simple docstring'''






      def 	_SCREAMING_SNAKE_CASE    (					self     :				Union[str, Any])				->Optional[Any]:


          """simple docstring"""


          _lowerCamelCase     :		Tuple 						=						["""a""", """b""", """c"""]

          # Defaults to last layer if both are None
          _lowerCamelCase						,							_lowerCamelCase     :		int 						=						get_aligned_output_features_output_indices(_UpperCamelCase    ,  _UpperCamelCase    ,  _UpperCamelCase)
          self.assertEqual(_UpperCamelCase    ,  ["""c"""])
          self.assertEqual(_UpperCamelCase    ,  [2])

          # Out indices set to match out features
          _lowerCamelCase						,							_lowerCamelCase     :		int 						=						get_aligned_output_features_output_indices(["""a""", """c"""]    ,  _UpperCamelCase    ,  _UpperCamelCase)
          self.assertEqual(_UpperCamelCase    ,  ["""a""", """c"""])
          self.assertEqual(_UpperCamelCase    ,  [0, 2])

          # Out features set to match out indices
          _lowerCamelCase						,							_lowerCamelCase     :		Tuple 						=						get_aligned_output_features_output_indices(_UpperCamelCase    ,  [0, 2]    ,  _UpperCamelCase)
          self.assertEqual(_UpperCamelCase    ,  ["""a""", """c"""])
          self.assertEqual(_UpperCamelCase    ,  [0, 2])

          # Out features selected from negative indices
          _lowerCamelCase						,							_lowerCamelCase     :		str 						=						get_aligned_output_features_output_indices(_UpperCamelCase    ,  [-3, -1]    ,  _UpperCamelCase)
          self.assertEqual(_UpperCamelCase    ,  ["""a""", """c"""])
          self.assertEqual(_UpperCamelCase    ,  [-3, -1])



      def 	_SCREAMING_SNAKE_CASE    (					self     :				int)				->int:


          """simple docstring"""


          with self.assertRaises(_UpperCamelCase):
              verify_out_features_out_indices(["""a""", """b"""]    ,  (0, 1)    ,  _UpperCamelCase)

          # Out features must be a list
          with self.assertRaises(_UpperCamelCase):
              verify_out_features_out_indices(("""a""", """b""")    ,  (0, 1)    ,  ["""a""", """b"""])

          # Out features must be a subset of stage names
          with self.assertRaises(_UpperCamelCase):
              verify_out_features_out_indices(["""a""", """b"""]    ,  (0, 1)    ,  ["""a"""])

          # Out indices must be a list or tuple
          with self.assertRaises(_UpperCamelCase):
              verify_out_features_out_indices(_UpperCamelCase    ,  0    ,  ["""a""", """b"""])

          # Out indices must be a subset of stage names
          with self.assertRaises(_UpperCamelCase):
              verify_out_features_out_indices(_UpperCamelCase    ,  (0, 1)    ,  ["""a"""])

          # Out features and out indices must be the same length
          with self.assertRaises(_UpperCamelCase):
              verify_out_features_out_indices(["""a""", """b"""]    ,  (0,)    ,  ["""a""", """b""", """c"""])

          # Out features should match out indices
          with self.assertRaises(_UpperCamelCase):
              verify_out_features_out_indices(["""a""", """b"""]    ,  (0, 2)    ,  ["""a""", """b""", """c"""])

          # Out features and out indices should be in order
          with self.assertRaises(_UpperCamelCase):
              verify_out_features_out_indices(["""b""", """a"""]    ,  (0, 1)    ,  ["""a""", """b"""])

          # Check passes with valid inputs
          verify_out_features_out_indices(["""a""", """b""", """d"""]    ,  (0, 1, -1)    ,  ["""a""", """b""", """c""", """d"""])




      def 	_SCREAMING_SNAKE_CASE    (					self     :				int)				->List[Any]:


          """simple docstring"""


          _lowerCamelCase     :		int 						=						BackboneMixin()

          _lowerCamelCase     :		Union[str, Any] 						=						["""a""", """b""", """c"""]
          _lowerCamelCase     :		Tuple 						=						["""a""", """c"""]
          _lowerCamelCase     :		List[Any] 						=						[0, 2]

          # Check that the output features and indices are set correctly
          self.assertEqual(backbone.out_features    ,  ["""a""", """c"""])
          self.assertEqual(backbone.out_indices    ,  [0, 2])

          # Check out features and indices are updated correctly
          _lowerCamelCase     :		str 						=						["""a""", """b"""]
          self.assertEqual(backbone.out_features    ,  ["""a""", """b"""])
          self.assertEqual(backbone.out_indices    ,  [0, 1])

          _lowerCamelCase     :		Optional[int] 						=						[-3, -1]
          self.assertEqual(backbone.out_features    ,  ["""a""", """c"""])
          self.assertEqual(backbone.out_indices    ,  [-3, -1])




