a,b,c=map(int,input().split())
ans=[c]
for i in range(10):
    ans.append(ans[i]*a-b)
    print(ans[i+1]) a,b,c=map(int,input().split()) a map(int,input().split()) map int input().split() ().split () input split b c ans=[c] ans [c] c for i in range(10):
    ans.append(ans[i]*a-b)
    print(ans[i+1]) i range(10) range 10 ans.append(ans[i]*a-b) ans.append ans append ans[i]*a-b ans[i]*a ans[i] ans i a b print(ans[i+1]) print ans[i+1] ans i+1 i 1 a,b,c=map(int,input().split()) map(int,input().split()) a b,c=map(int,input().split()) map(int,input().split()) b ans=[c] [c] ans c=map(int,input().split()) map(int,input().split()) c
a,b,c=map(int,input().split())
ans=[c]
for i in range(10):
    ans.append(ans[i]*a-b)
    print(ans[i+1])