
class      A__							:  # Public class to implement a graph






				def __init__(						self					:      Optional[Any]    ,     a					:      int    ,     a					:      int    ,     a					:      list[list[bool]]   ):






							'''simple docstring'''







							lowerCAmelCase__      :      Dict         =		row
							lowerCAmelCase__      :      List[str]         =		col
							lowerCAmelCase__      :      List[str]         =		graph






				def 							_lowerCamelCase		(						self					:      Tuple    ,     a					:      int    ,     a					:      int    ,     a					:      list[list[bool]]   ):






							'''simple docstring'''







							return (
							    0 <= i < self.ROW
							    and 0 <= j < self.COL
							    and not visited[i][j]
							    and self.graph[i][j]
							)






				def 							_lowerCamelCase		(						self					:      Tuple    ,     a					:      int    ,     a					:      int    ,     a					:      list[list[bool]]   ):






							'''simple docstring'''







							lowerCAmelCase__      :      Any         =		[-1, -1, -1, 0, 0, 1, 1, 1]  # Coordinate order
							lowerCAmelCase__      :      Tuple         =		[-1, 0, 1, -1, 1, -1, 0, 1]
							lowerCAmelCase__      :      Optional[int]         =		True  # Make those cells visited
							for k in range(8   ):
										if self.is_safe(i + row_nbr[k]    ,     j + col_nbr[k]    ,     a   ):
													self.diffs(i + row_nbr[k]    ,     j + col_nbr[k]    ,     a   )






				def 							_lowerCamelCase		(						self					:      Any   ):  # And finally, count all islands.






							'''simple docstring'''







							lowerCAmelCase__      :      Tuple         =		[[False for j in range(self.COL   )] for i in range(self.ROW   )]
							lowerCAmelCase__      :      Union[str, Any]         =		0
							for i in range(self.ROW   ):
										for j in range(self.COL   ):
													if visited[i][j] is False and self.graph[i][j] == 1:
																self.diffs(a    ,     a    ,     a   )
																count += 1
							return count

import re
def  lowerCAmelCase__			(  SCREAMING_SNAKE_CASE_     )				->		str:

			if len(re.findall('[ATCG]'       ,							SCREAMING_SNAKE_CASE_     )     ) != len(SCREAMING_SNAKE_CASE_     ):
						raise ValueError('Invalid Strand'     )

			return dna.translate(dna.maketrans('ATCG'       ,							'TAGC'     )     )


if __name__ == "__main__":
					import doctest

					doctest.testmod()