"""simple docstring"""






import os
import sys
import time

from . import transposition_cipher as trans_cipher



def SCREAMING_SNAKE_CASE__    (     )						->						None:
   lowercase__:     Any      =   '''Prehistoric Men.txt'''
   lowercase__:     Union[str, Any]      =   '''Output.txt'''
   lowercase__:     str      =   int(input('''Enter key: '''				)				)
   lowercase__:     List[str]      =   input('''Encrypt/Decrypt [e/d]: '''				)

   if not os.path.exists(_UpperCamelCase				):
      print(F"""File {input_file} does not exist. Quitting..."""				)
      sys.exit()
   if os.path.exists(_UpperCamelCase				):
      print(F"""Overwrite {output_file}? [y/n]"""				)
      lowercase__:     Dict      =   input('''> '''				)
      if not response.lower().startswith('''y'''				):
         sys.exit()

   lowercase__:     str      =   time.time()
   if mode.lower().startswith('''e'''				):
      with open(_UpperCamelCase				) as f:
         lowercase__:     int      =   f.read()
      lowercase__:     Tuple      =   trans_cipher.encrypt_message(_UpperCamelCase ,					_UpperCamelCase				)
   elif mode.lower().startswith('''d'''				):
      with open(_UpperCamelCase				) as f:
         lowercase__:     Union[str, Any]      =   f.read()
      lowercase__:     Tuple      =   trans_cipher.decrypt_message(_UpperCamelCase ,					_UpperCamelCase				)

   with open(_UpperCamelCase ,					'''w'''				) as output_obj:
      output_obj.write(_UpperCamelCase				)

   lowercase__:     int      =   round(time.time() - start_time ,					2				)
   print(('''Done (''', total_time, '''seconds )''')				)


if __name__ == "__main__":
       main()

"""simple docstring"""






def SCREAMING_SNAKE_CASE__    (     __UpperCAmelCase				)						->						Optional[int]:
   lowercase__:     str      =   [7_0_1, 3_0_1, 1_3_2, 5_7, 2_3, 1_0, 4, 1]
   for gap in gaps:
      for i in range(__UpperCAmelCase ,					len(__UpperCAmelCase				)				):
         lowercase__:     Any      =   collection[i]
         lowercase__:     Tuple      =   i
         while j >= gap and collection[j - gap] > insert_value:
            lowercase__:     List[str]      =   collection[j - gap]
            j -= gap
         if j != i:
            lowercase__:     List[str]      =   insert_value
   return collection


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

       testmod()
       __A         =				input("Enter numbers separated by a comma:\n").strip()
       __A         =				[int(item) for item in user_input.split(",")]
       print(shell_sort(unsorted))
