def getSymbols(epr):
    """
    Recursively extracts symbols from an expression.

    Parameters
    ----------
    epr: expression
    
    Returns
    -------
    list-Symbol
    """
    result = []
    for ele in epr.args:
        if ele.is_symbol:
            result.append(ele)
        else:
            result.extend(getSymbols(ele))
    return list(set(result))