#include <bits/stdc++.h> /* run this program using the console pauser or add your own getch, system("pause") or input loop */ using namespace std; long long x,y,z,k; string s; int main(int argc, char** argv) { cin>>k; while(k--) { cin>>s; if(s=="x-z") { cin>>y; z=y>>1; x=y+z; } else { cin>>z; y=z+z; x=y+z; } cout<<x<<" "<<y<<" "<<z; } return 0; }