def __init__(self, F, coef):
    self.F = F
    if isinstance(coef, list):
        self.coef = coef
        self.deg = len(coef)
    else:
        self.coef = [coef]
        self.deg = 1
def __init__(self, F, coef):
    self.F = F
    if isinstance(coef, list):
        self.coef = coef
        self.deg = len(coef)
    else:
        self.coef = [coef]
        self.deg = 1