






import itertools
import string
from collections.abc import Generator, Iterable







def 		SCREAMING_SNAKE_CASE							(					__lowerCAmelCase					,    __lowerCAmelCase			) ->	Generator[tuple[str, ...], None, None]:
     UpperCamelCase__			:   Any       				=  iter(__lowerCAmelCase			)
     while True:
          UpperCamelCase__			:   Optional[Any]       				=  tuple(itertools.islice(__lowerCAmelCase					,    __lowerCAmelCase			)			)
          if not chunk:
               return
          yield chunk







def 		SCREAMING_SNAKE_CASE							(					__lowerCAmelCase			) ->	str:
     UpperCamelCase__			:   int       				=  "".join([c.upper() for c in dirty if c in string.ascii_letters]			)
     UpperCamelCase__			:   Union[str, Any]       				=  ""

     if len(__lowerCAmelCase			) < 2:
          return dirty

     for i in range(len(__lowerCAmelCase			) - 1			):
          clean += dirty[i]

          if dirty[i] == dirty[i + 1]:
               clean += "X"

     clean += dirty[-1]

     if len(__lowerCAmelCase			) & 1:
          clean += "X"

     return clean







def 		SCREAMING_SNAKE_CASE							(					__lowerCAmelCase			) ->	list[str]:
     # I and J are used interchangeably to allow
     # us to use a 5x5 table (25 letters)
     UpperCamelCase__			:   List[str]       				=  "ABCDEFGHIKLMNOPQRSTUVWXYZ"
     # we're using a list instead of a '2d' array because it makes the math
     # for setting up the table and doing the actual encoding/decoding simpler
     UpperCamelCase__			:   Tuple       				=  []

     # copy key chars into the table if they are in `alphabet` ignoring duplicates
     for char in key.upper():
          if char not in table and char in alphabet:
               table.append(__lowerCAmelCase			)

    # fill the rest of the table in with the remaining alphabet chars
     for char in alphabet:
          if char not in table:
               table.append(__lowerCAmelCase			)

     return table







def 		SCREAMING_SNAKE_CASE							(					__lowerCAmelCase					,    __lowerCAmelCase			) ->	str:
     UpperCamelCase__			:   Optional[Any]       				=  generate_table(__lowerCAmelCase			)
     UpperCamelCase__			:   Tuple       				=  prepare_input(__lowerCAmelCase			)
     UpperCamelCase__			:   Tuple       				=  ""

     # https://en.wikipedia.org/wiki/Playfair_cipher#Description
     for chara, chara in chunker(__lowerCAmelCase					,    2			):
          UpperCamelCase__				,     UpperCamelCase__			:   Tuple       				=  divmod(table.index(__lowerCAmelCase			)					,    5			)
          UpperCamelCase__				,     UpperCamelCase__			:   Optional[int]       				=  divmod(table.index(__lowerCAmelCase			)					,    5			)

          if rowa == rowa:
               ciphertext += table[rowa * 5 + (cola + 1) % 5]
               ciphertext += table[rowa * 5 + (cola + 1) % 5]
          elif cola == cola:
               ciphertext += table[((rowa + 1) % 5) * 5 + cola]
               ciphertext += table[((rowa + 1) % 5) * 5 + cola]
          else:  # rectangle
               ciphertext += table[rowa * 5 + cola]
               ciphertext += table[rowa * 5 + cola]

     return ciphertext







def 		SCREAMING_SNAKE_CASE							(					__lowerCAmelCase					,    __lowerCAmelCase			) ->	str:
     UpperCamelCase__			:   List[str]       				=  generate_table(__lowerCAmelCase			)
     UpperCamelCase__			:   Optional[int]       				=  ""

     # https://en.wikipedia.org/wiki/Playfair_cipher#Description
     for chara, chara in chunker(__lowerCAmelCase					,    2			):
          UpperCamelCase__				,     UpperCamelCase__			:   str       				=  divmod(table.index(__lowerCAmelCase			)					,    5			)
          UpperCamelCase__				,     UpperCamelCase__			:   str       				=  divmod(table.index(__lowerCAmelCase			)					,    5			)

          if rowa == rowa:
               plaintext += table[rowa * 5 + (cola - 1) % 5]
               plaintext += table[rowa * 5 + (cola - 1) % 5]
          elif cola == cola:
               plaintext += table[((rowa - 1) % 5) * 5 + cola]
               plaintext += table[((rowa - 1) % 5) * 5 + cola]
          else:  # rectangle
               plaintext += table[rowa * 5 + cola]
               plaintext += table[rowa * 5 + cola]

     return plaintext







# this script reports modified .py files under the desired list of top-level sub-dirs passed as a list of arguments, e.g.:
#   python ./utils/get_modified_files.py utils src tests examples
#
# it uses git to find the forking point and which files were modified - i.e. files not under git won't be considered
# since the output of this script is fed into Makefile commands it doesn't print a newline after the results

import re
import subprocess
import sys


lowerCamelCase	:							Optional[Any]				=subprocess.check_output('''git merge-base main HEAD'''.split()).decode('''utf-8''')
lowerCamelCase	:							str				=subprocess.check_output(F"""git diff --name-only {fork_point_sha}""".split()).decode('''utf-8''').split()

lowerCamelCase	:							List[Any]				='''|'''.join(sys.argv[1:])
lowerCamelCase	:							str				=re.compile(RF"""^({joined_dirs}).*?\.py$""")

lowerCamelCase	:							Optional[int]				=[x for x in modified_files if regex.match(x)]
print(''' '''.join(relevant_modified_files), end='''''')