using nmaespace std; int main() { int a,b,c; cin>>a>>b>>c; cout<<(a+b)%c<<endl; cout<<abs(a-b)%c<<endl; cout<<(a*b)%c<<endl; }