def gcd(n: int, m: int) -> int:
	"""Euklidean algorithm. Finds greatest common divisor of n and m

	Args:
		n -- first number
		m -- second number

	Return: greatest common divisor of n and m.
	"""

	if not n: return m
	if not m: return n

	while n:
		n, m = m % n, n
	return m