from sys import stdin
from math import sqrt
print("Jutge enters")
for line in stdin:
    if "=" in line:
        "defining a new name"
        name, func = line.split("=")
        locals().update({name.strip(): eval(func)})
    elif line.strip():
        "3 nonempty lines per case: function, iterations, seed"
        f = eval(line)
        n = int(stdin.readline())
        x = float(stdin.readline())
        print(line.strip(), n, x, iterated_appl(f, n)(x))
print("Jutge exits")