# very ugly solution
def min(*args,**kwargs):
	key = kwargs.get("key",None)
	
	if hasattr(args[0],'__iter__') and not isinstance(args[0],str):
		# is some sort of an iterable object that is not a string
		args = sorted(args,key=key)

		if len(args) == 1:
			args = args[0]
			args = sorted(args,key=key)

		return args[0]
	
	elif isinstance(args[0],str):
		args = args[0]
		args = sorted(list(args),key=key)
		return args[0]

	else:
		args = sorted(list(args),key=key)
		return args[0]

def max(*args,**kwargs):
	key = kwargs.get("key",None)
	if hasattr(args[0],'__iter__') and not isinstance(args[0],str):
		# is some sort of an iterable object that is not a string
		args = sorted(args,key=key,reverse=True)
		
		if len(args) == 1:
			args = list(args[0])
			args = sorted(args,key=key,reverse=True)

		return args[0]

	elif isinstance(args[0],str):
		args = args[0]
		args = sorted(list(args),key=key,reverse=True)
		return args[0]
	else:
		args = sorted(list(args),key=key,reverse=True)
		return args[0]

print(min([1,2,3]))
print(max((2,1)))
print(min(8,9))
print(max("yolo"))
print(min("j"))