def check_seq(seq, seq_len, seq_dict):
    """
    Check the validity of sequence.

    :param seq: test sequence
    :type seq: str
    :param seq_len: sequence length
    :type seq_len: int
    :param seq_dict: players sequences
    :type seq_dict: dict
    :return: validity as bool
    """
    seq_elements = set(list(seq))
    if len(seq) == seq_len and seq_elements.issubset({'T', 'H'}
        ) and seq not in seq_dict.values():
        return True
    return False
