Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
615 B
2
Indexable
Never
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{

#ifndef ONLINE_JUDGE

 freopen("input.txt", "r", stdin);

  
 freopen("output.txt", "w", stdout);



#endif
ll t;
cin>>t;
while(t--)
{
	ll x,y;
	cin>>x>>y;
	if(y>=x)
	{
		vector<ll>v;
		v.push_back(3*x-y-(y+1));
		v.push_back(y);
		v.push_back(y+1);
		sort(v.begin(),v.end());
		for(auto x:v)
		{
			cout<<x<<" ";
		}
		cout<<endl;
		
	}
	else 
	{
		vector<ll>v;
		v.push_back(abs(3*x-y-(y-1)));
		v.push_back(y);
		v.push_back(y-1);
		sort(v.begin(),v.end());
			for(auto x:v)
		{
			cout<<x<<" ";
		}
		cout<<endl;
	}
	
}






 
}