






def    __lowerCAmelCase   (    __snake_case       ,			__snake_case							):
     __lowerCAmelCase             =       [[] for _ in range(__snake_case							)]
     __lowerCAmelCase             =       key - 1

     if key <= 0:
          raise ValueError("Height of grid can't be 0 or negative"							)
     if key == 1 or len(__snake_case							) <= key:
          return input_string

     for position, character in enumerate(__snake_case							):
          __lowerCAmelCase             =       position % (lowest * 2)  # puts it in bounds
          __lowerCAmelCase             =       min(__snake_case       ,			lowest * 2 - num							)  # creates zigzag pattern
          temp_grid[num].append(__snake_case							)
     __lowerCAmelCase             =       ["".join(__snake_case							) for row in temp_grid]
     __lowerCAmelCase             =       "".join(__snake_case							)

     return output_string





def    __lowerCAmelCase   (    __snake_case       ,			__snake_case							):
     __lowerCAmelCase             =       []
     __lowerCAmelCase             =       key - 1

     if key <= 0:
          raise ValueError("Height of grid can't be 0 or negative"							)
     if key == 1:
          return input_string

     __lowerCAmelCase             =       [[] for _ in range(__snake_case							)]  # generates template
     for position in range(len(__snake_case							)							):
          __lowerCAmelCase             =       position % (lowest * 2)  # puts it in bounds
          __lowerCAmelCase             =       min(__snake_case       ,			lowest * 2 - num							)  # creates zigzag pattern
          temp_grid[num].append("*"							)

     __lowerCAmelCase             =       0
     for row in temp_grid:  # fills in the characters
          __lowerCAmelCase             =       input_string[counter : counter + len(__snake_case							)]
          grid.append(list(__snake_case							)							)
          counter += len(__snake_case							)

     __lowerCAmelCase             =       ""  # reads as zigzag
     for position in range(len(__snake_case							)							):
          __lowerCAmelCase             =       position % (lowest * 2)  # puts it in bounds
          __lowerCAmelCase             =       min(__snake_case       ,			lowest * 2 - num							)  # creates zigzag pattern
          output_string += grid[num][0]
          grid[num].pop(0							)
     return output_string





def    __lowerCAmelCase   (    __snake_case							):
     __lowerCAmelCase             =       {}
     for key_guess in range(1       ,			len(__snake_case							)							):  # tries every key
          __lowerCAmelCase             =       decrypt(__snake_case       ,			__snake_case							)
     return results


if __name__ == "__main__":
 import doctest

 doctest.testmod()














from __future__ import annotations

import os
from typing import Any

import requests

lowerCamelCase      :       Tuple    =						'''https://api.github.com'''

# https://docs.github.com/en/free-pro-team@latest/rest/reference/users#get-the-authenticated-user
lowerCamelCase      :       int    =						BASE_URL + '''/user'''

# https://github.com/settings/tokens
lowerCamelCase      :       Any    =						os.environ.get('''USER_TOKEN''', '''''')





def    __lowerCAmelCase   (    __snake_case							):
     __lowerCAmelCase             =       {
         "Authorization": F"""token {auth_token}""",
         "Accept": "application/vnd.github.v3+json",
     }
     return requests.get(__snake_case       ,			headers=__snake_case							).json()


if __name__ == "__main__":  # pragma: no cover
 if USER_TOKEN:
  for key, value in fetch_github_info(USER_TOKEN).items():
   print(F'''{key}: {value}''')
 else:
  raise ValueError('''\'USER_TOKEN\' field cannot be empty.''')






