def ConsensusMotif(sequence_set):
    """Find the consensus motif for the input sequence set."""
    k = len(sequence_set[0])
    matrix = [[0] * k for i in range(4)]  # Initiate a zero-filled nested list.
    for col, colbases in enumerate(zip(*sequence_set)):
        for row, letter in enumerate('ACGT'):
            matrix[row][col] = colbases.count(letter)  # Count nuc in each col.
    convert = {0: 'A', 1: 'C', 2: 'G', 3: 'T'}
    motif = ''.join([convert[col.index(max(col))] for col in zip(*matrix)])
    return motif