from typing import Counter


def flush_finder(hand):
	"""
	Takes a 5-card hand, concats, returns the most frequent symbol.
	If we get 5 matching suits, we have a flush, return list:
	[8, high card rank, 2nd rank, 3rd rank, 4th rank, 5th rank]
	"""
	suits = ''.join(hand)
	if Counter(suits).most_common(1)[0][1] == 5:
		cards = ''.join(hand)[::2]
		ranks = sorted(cards, reverse=True)
		return [8, ord(ranks[0]), ord(ranks[1]), ord(ranks[2]), ord(ranks[3]), ord(ranks[4])]
	else:
		return [0, 0, 0, 0, 0, 0]