


import math






def 	__lowerCAmelCase   ()->  None:




      """simple docstring"""

      snake_case_	=				input('''Enter message: ''' )
      snake_case_	=				int(input(f'''Enter key [2-{len(SCREAMING_SNAKE_CASE ) - 1}]: ''' ) )
      snake_case_	=				input('''Encryption/Decryption [e/d]: ''' )

      if mode.lower().startswith('''e''' ):
            snake_case_	=				encrypt_message(SCREAMING_SNAKE_CASE , SCREAMING_SNAKE_CASE )
      elif mode.lower().startswith('''d''' ):
            snake_case_	=				decrypt_message(SCREAMING_SNAKE_CASE , SCREAMING_SNAKE_CASE )

      # Append pipe symbol (vertical bar) to identify spaces at the end.
      print(f'''Output:\n{text + "|"}''' )






def 	__lowerCAmelCase   (SCREAMING_SNAKE_CASE , SCREAMING_SNAKE_CASE )->  str:




      """simple docstring"""

      snake_case_	=				[''''''] * key
      for col in range(SCREAMING_SNAKE_CASE ):
            snake_case_	=				col
            while pointer < len(SCREAMING_SNAKE_CASE ):
                  cipher_text[col] += message[pointer]
                  pointer += key
      return "".join(SCREAMING_SNAKE_CASE )






def 	__lowerCAmelCase   (SCREAMING_SNAKE_CASE , SCREAMING_SNAKE_CASE )->  str:




      """simple docstring"""

      snake_case_	=				math.ceil(len(SCREAMING_SNAKE_CASE ) / key )
      snake_case_	=				key
      snake_case_	=				(num_cols * num_rows) - len(SCREAMING_SNAKE_CASE )
      snake_case_	=				[''''''] * num_cols
      snake_case_	=				0
      snake_case_	=				0

      for symbol in message:
            plain_text[col] += symbol
            col += 1

            if (
                (col == num_cols)
                or (col == num_cols - 1)
                and (row >= num_rows - num_shaded_boxes)
            ):
                  snake_case_	=				0
                  row += 1

      return "".join(SCREAMING_SNAKE_CASE )


if __name__ == "__main__":
   import doctest

   doctest.testmod()
   main()



def 	__lowerCAmelCase   (SCREAMING_SNAKE_CASE , SCREAMING_SNAKE_CASE )->  list[int]:




      """simple docstring"""

      snake_case_	=				int(SCREAMING_SNAKE_CASE )

      # Initialize Result
      snake_case_	=				[]

      # Traverse through all denomination
      for denomination in reversed(SCREAMING_SNAKE_CASE ):
            # Find denominations
            while int(SCREAMING_SNAKE_CASE ) >= int(SCREAMING_SNAKE_CASE ):
                  total_value -= int(SCREAMING_SNAKE_CASE )
                  answer.append(SCREAMING_SNAKE_CASE )  # Append the "answers" array

      return answer


# Driver Code
if __name__ == "__main__":
   UpperCAmelCase      =   []
   UpperCAmelCase      =   """0"""

   if (
       input("""Do you want to enter your denominations ? (yY/n): """).strip().lower()
       == "y"
   ):
      UpperCAmelCase      =   int(input("""Enter the number of denominations you want to add: """).strip())

      for i in range(0, n):
         denominations.append(int(input(f'''Denomination {i}: ''').strip()))
      UpperCAmelCase      =   input("""Enter the change you want to make in Indian Currency: """).strip()
   else:
      # All denominations of Indian Currency if user does not enter
      UpperCAmelCase      =   [1, 2, 5, 10, 20, 50, 100, 500, 2000]
      UpperCAmelCase      =   input("""Enter the change you want to make: """).strip()

   if int(value) == 0 or int(value) < 0:
      print("""The total value cannot be zero or negative.""")

   else:
      print(f'''Following is minimal change for {value}: ''')
      UpperCAmelCase      =   find_minimum_change(denominations, value)
      # Print result
      for i in range(len(answer)):
         print(answer[i], end=""" """)