import collections


def most_common(row, *, default=0):
	""" Return the most-common element in the array; break ties arbitrarily. """
	C = collections.Counter(row)
	return C.most_common(1)[0][0] if C else default