#include using namespace std; int main() { int a,b,c,d; cin>>a>>b>>c; while(a!=0||b!=0||c!=0) { d=b-a; if(d==(c-b)) { cout<<"AP "<<(c+d)<>a>>b>>c; } return 0; }