






"""simple docstring"""


def 				a (     UpperCamelCase_							:				list     ,	UpperCamelCase_							:				int		)  ->		int:
 for index, item in enumerate(UpperCamelCase_		):
  if item == target:
   return index
 return -1




def 				a (     UpperCamelCase_							:				list     ,	UpperCamelCase_							:				int     ,	UpperCamelCase_							:				int     ,	UpperCamelCase_							:				int		)  ->		int:
 if not (0 <= high < len(UpperCamelCase_		) and 0 <= low < len(UpperCamelCase_		)):
  raise Exception('Invalid upper or lower bound!'		)
 if high < low:
  return -1
 if sequence[low] == target:
  return low
 if sequence[high] == target:
  return high
 return rec_linear_search(UpperCamelCase_     ,	low + 1     ,	high - 1     ,	UpperCamelCase_		)


if __name__ == "__main__":
   _UpperCamelCase   :						Any     						= input("""Enter numbers separated by comma:\n""").strip()
   _UpperCamelCase   :						Optional[Any]     						= [int(item.strip()) for item in user_input.split(""",""")]

   _UpperCamelCase   :						List[str]     						= int(input("""Enter a single number to be found in the list:\n""").strip())
   _UpperCamelCase   :						List[Any]     						= linear_search(sequence, target)
   if result != -1:
      print(f'''linear_search({sequence}, {target}) = {result}''')
   else:
      print(f'''{target} was not found in {sequence}''')













"""simple docstring"""


from string import ascii_uppercase




def 				a (     UpperCamelCase_							:				str     ,	UpperCamelCase_							:				str     ,	UpperCamelCase_							:				bool = False     ,	UpperCamelCase_							:				str = ascii_uppercase		)  ->		str:
 __A	:       List[str]       =	keyword.upper()
 __A	:       str       =	plaintext.upper()
 __A	:       int       =	set(UpperCamelCase_		)

 # create a list of unique characters in the keyword - their order matters
 # it determines how we will map plaintext characters to the ciphertext
 __A	:       int       =	[]
 for char in keyword:
  if char in alphabet_set and char not in unique_chars:
   unique_chars.append(UpperCamelCase_		)
    # the number of those unique characters will determine the number of rows
 __A	:       Any       =	len(UpperCamelCase_		)

 # create a shifted version of the alphabet
 __A	:       str       =	unique_chars + [
     char for char in alphabet if char not in unique_chars
 ]

 # create a modified alphabet by splitting the shifted alphabet into rows
 __A	:       int       =	[
     shifted_alphabet[k : k + num_unique_chars_in_keyword]
     for k in range(0     ,	2_6     ,	UpperCamelCase_		)
 ]

 # map the alphabet characters to the modified alphabet characters
 # going 'vertically' through the modified alphabet - consider columns first
 __A	:       Any       =	{}
 __A	:       Union[str, Any]       =	0
 for column in range(UpperCamelCase_		):
  for row in modified_alphabet:
   # if current row (the last one) is too short, break out of loop
   if len(UpperCamelCase_		) <= column:
    break

   # map current letter to letter in modified alphabet
   __A	:       str       =	row[column]
   letter_index += 1

 if verbose:
  print(UpperCamelCase_		)
 # create the encrypted text by mapping the plaintext to the modified alphabet
 return "".join(mapping[char] if char in mapping else char for char in plaintext		)


if __name__ == "__main__":
   # example use
   print(mixed_keyword("""college""", """UNIVERSITY"""))





