


def 						a__			(				A__,      A__,      A__,      A__				):
			SCREAMING_SNAKE_CASE_		,      SCREAMING_SNAKE_CASE_		:     Optional[int]					=					len(A__				), len(grid[0]				)
			if (
			    min(A__,      A__				) < 0
			    or row == row_length
			    or col == col_length
			    or (row, col) in visit
			    or grid[row][col] == 1
			):
						return 0
			if row == row_length - 1 and col == col_length - 1:
						return 1

			visit.add((row, col)				)

			SCREAMING_SNAKE_CASE_		:     Dict					=					0
			count += depth_first_search(A__,      row + 1,      A__,      A__				)
			count += depth_first_search(A__,      row - 1,      A__,      A__				)
			count += depth_first_search(A__,      A__,      col + 1,      A__				)
			count += depth_first_search(A__,      A__,      col - 1,      A__				)

			visit.remove((row, col)				)
			return count


if __name__ == "__main__":
				import doctest

				doctest.testmod()









import webbrowser
from sys import argv
from urllib.parse import parse_qs, quote

import requests
from bsa import BeautifulSoup
from fake_useragent import UserAgent

if __name__ == "__main__":
				lowerCAmelCase__			:      Optional[int]								='%20'.join(argv[1:]) if len(argv) > 1 else quote(str(input('Search: ')))

				print('Googling.....')

				lowerCAmelCase__			:      Optional[int]								=F"""https://www.google.com/search?q={query}&num=100"""

				lowerCAmelCase__			:      Union[str, Any]								=requests.get(
				    url,
				    headers={'User-Agent': str(UserAgent().random)},
				)

				try:
								lowerCAmelCase__			:      str								=(
								    BeautifulSoup(res.text, 'html.parser')
								    .find('div', attrs={'class': 'yuRUbf'})
								    .find('a')
								    .get('href')
								)

				except AttributeError:
								lowerCAmelCase__			:      Optional[Any]								=parse_qs(
								    BeautifulSoup(res.text, 'html.parser')
								    .find('div', attrs={'class': 'kCrYT'})
								    .find('a')
								    .get('href')
								)['url'][0]

				webbrowser.open(link)





