def is_tableau_code(tabcode):
    """
    Return True iff two character string is a valie tableau code.
    """
    if ( (tabcode[0] not in ['L','R','P','O'] or
          tabcode[1] not in ['E','D','S','T']) and
         tabcode != 'HH' and tabcode != 'KK' ):
         return False
    else:
        return True