#include using namespace std; #define ll long long map mp; int main(){ ll int x,y,z; queue > q; q.push(make_pair(0,"")); string ans; string ansS; cin>>x>>y>>z; while(!q.empty()){ if(z==16418813)break; pair bfs=q.front(); cout<::value_type(bfs.first,bfs.second)); if(bfs.first==z){ break; } } else{ q.pop(); continue; } if(bfs.first>z){ q.pop(); continue; } q.push(make_pair(bfs.first+x,bfs.second+"+a")); q.push(make_pair(bfs.first+y,bfs.second+"+b")); if(bfs.first-x>0)q.push(make_pair(bfs.first-x,bfs.second+"-a")); if(bfs.first-y>0)q.push(make_pair(bfs.first-y,bfs.second+"-b")); q.pop(); } if(mp.find(z)!=mp.end())ans = mp[z]; else ans=""; vector miN; vector plN; for(int i=0; i10000||ans.length()==0){ cout<<"mourennaihasimasenn"<=0; i--){ ansS+=plN[i]; ansS+='W'; plN.pop_back(); } for(int i=0; i