code: 
  
  
  from __future__ import annotations
  
  from string import ascii_letters
  def 							_UpperCAmelCase       (UpperCamelCase__  :						List[Any]       ,							UpperCamelCase__  :						int       ,							UpperCamelCase__  :						str = None		)     ->   str:
         _A   : Union[str, Any]       					=				alphabet or ascii_letters
  
         # The final result string
         _A   : str       					=				''''''
  
         for character in input_string:
                if character not in alpha:
                       # Append without encryption if character is not in the alphabet
                       result += character
                else:
                       # Get the index of the new key and make sure it isn't too large
                       _A   : str       					=				(alpha.index(UpperCamelCase__		) + key) % len(UpperCamelCase__		)
  
                       # Append the encoded character to the alphabet
                       result += alpha[new_key]
  
         return result
  def 							_UpperCAmelCase       (UpperCamelCase__  :						str       ,							UpperCamelCase__  :						List[str]       ,							UpperCamelCase__  :						Any = None		)     ->   str:
         key *= -1
  
         return encrypt(UpperCamelCase__       ,							UpperCamelCase__       ,							UpperCamelCase__		)
  def 							_UpperCAmelCase       (UpperCamelCase__  :						Union[str, Any]       ,							UpperCamelCase__  :						Optional[int] = None		)     ->   dict[int, str]:
         _A   : Dict       					=				alphabet or ascii_letters
  
         # To store data on all the combinations
         _A   : List[str]       					=				{}
  
         # Cycle through each combination
         for key in range(1       ,							len(UpperCamelCase__		) + 1		):
                # Decrypt the message and store the result in the data
                _A   : Optional[int]       					=				decrypt(UpperCamelCase__       ,							UpperCamelCase__       ,							UpperCamelCase__		)
  
         return brute_force_data
  
  
  if __name__ == "__main__":
      while True:
          print(f"\n{'-' * 10}\n Menu\n{'-' * 10}")
          print(*['1.Encrypt', '2.Decrypt', '3.BruteForce', '4.Quit'], sep='\n')
  
          # get user input
          lowerCAmelCase__   	=				input('\nWhat would you like to do?: ').strip() or """4"""
  
          # run functions based on what the user chose
          if choice not in ("1", "2", "3", "4"):
              print('Invalid choice, please enter a valid choice')
          elif choice == "1":
              lowerCAmelCase__   	=				input('Please enter the string to be encrypted: ')
              lowerCAmelCase__   	=				int(input('Please enter off-set: ').strip())
  
              print(encrypt(input_string, key))
          elif choice == "2":
              lowerCAmelCase__   	=				input('Please enter the string to be decrypted: ')
              lowerCAmelCase__   	=				int(input('Please enter off-set: ').strip())
  
              print(decrypt(input_string, key))
          elif choice == "3":
              lowerCAmelCase__   	=				input('Please enter the string to be decrypted: ')
              lowerCAmelCase__   	=				brute_force(input_string)
  
              for key, value in brute_force_data.items():
                  print(f"Key: {key} | Message: {value}")
  
          elif choice == "4":
              print('Goodbye.')
              break
  
style_context: 
  
  
  from typing import TYPE_CHECKING
  
  from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available, is_vision_available
  
  
  lowerCAmelCase__   	=				{'configuration_detr': ['DETR_PRETRAINED_CONFIG_ARCHIVE_MAP', 'DetrConfig', 'DetrOnnxConfig']}
  
  try:
      if not is_vision_available():
          raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
      pass
  else:
      lowerCAmelCase__   	=				['DetrFeatureExtractor']
      lowerCAmelCase__   	=				['DetrImageProcessor']
  
  try:
      if not is_torch_available():
          raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
      pass
  else:
      lowerCAmelCase__   	=				[
          'DETR_PRETRAINED_MODEL_ARCHIVE_LIST',
          'DetrForObjectDetection',
          'DetrForSegmentation',
          'DetrModel',
          'DetrPreTrainedModel',
      ]
  
  
  if TYPE_CHECKING:
      from .configuration_detr import DETR_PRETRAINED_CONFIG_ARCHIVE_MAP, DetrConfig, DetrOnnxConfig
  
      try:
          if not is_vision_available():
              raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
          pass
      else:
          from .feature_extraction_detr import DetrFeatureExtractor
          from .image_processing_detr import DetrImageProcessor
  
      try:
          if not is_torch_available():
              raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
          pass
      else:
          from .modeling_detr import (
              DETR_PRETRAINED_MODEL_ARCHIVE_LIST,
              DetrForObjectDetection,
              DetrForSegmentation,
              DetrModel,
              DetrPreTrainedModel,
          )
  
  else:
      import sys
  
      lowerCAmelCase__   	=				_LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)
  