import random


def giveHint(indexValue, myBoard):
    """Return a random matching card given the index of a card
    and a game board"""
    validMatches = []
    card = myBoard[indexValue]
    for c in myBoard:
        if (card[0] == c[0]) and (myBoard.index(c) != indexValue):
            validMatches.append(myBoard.index(c))
    return random.choice(validMatches)