r,D,x = map(int, input().split())
y = []
y.append(x)
for i in range(10):
    print(r*y[i]-D)
    y.append(r*y[i]-D) r,D,x = map(int, input().split()) r map(int, input().split()) map int input().split() ().split () input split D x y = [] y [] y.append(x) y.append y append x for i in range(10):
    print(r*y[i]-D)
    y.append(r*y[i]-D) i range(10) range 10 print(r*y[i]-D) print r*y[i]-D r*y[i] r y[i] y i D y.append(r*y[i]-D) y.append y append r*y[i]-D r*y[i] r y[i] y i D x = map(int, input().split()) map(int, input().split()) x D,x = map(int, input().split()) map(int, input().split()) D y = [] [] y r,D,x = map(int, input().split()) map(int, input().split()) r
r,D,x = map(int, input().split())
y = []
y.append(x)
for i in range(10):
    print(r*y[i]-D)
    y.append(r*y[i]-D)