#include<bits/stdc++.h>
#define rep(i,a,b) for(int i=(a);i<=(b);i++)
#define clr(x) memset(x,0,sizeof x)
#define fi first
#define se second
#define mp make_pair
using namespace std;
typedef double ld;

const ld eps=1e-6,Pi=acos(-1);
ld mo(ld x,ld y){return sqrt(x*x+y*y);}
ld fix(ld a){return a>Pi?a-2*Pi:(a<-Pi?a+2*Pi:a);}
int cmp(ld a,ld b){return fabs(a-b)<eps?0:a<b?-1:1;}

const int N=100005;
ld d[N],k[N],b[N],dir[N],L[N],R[N],X[N],ox,oy,l,r=1e10,ans;
int id[N],n,cnt,aim,acc;

void create(ld r){
	cnt=0;
	rep(i,1,n){
		if(d[i]>r)continue;
		ld de=acos(d[i]/r);
		L[i]=fix(dir[i]-de);
		R[i]=fix(dir[i]+de);
		if(L[i]>R[i])swap(L[i],R[i]);
		id[++cnt]=i;
	}
}

int a[N],c[N];
void upd(int x,int y){
	for(;x<N;x+=x&-x)c[x]+=y;
}
int qry(int x){
	int res=0;
	for(;x;x-=x&-x)res+=c[x];
	return res;
}
int calc(){
	int res=0,t=0; clr(c),clr(a);
	rep(i,1,cnt) X[++t]=L[id[i]],X[++t]=R[id[i]];
	sort(X+1,X+t+1);
	rep(i,1,cnt){
		int A=lower_bound(X+1,X+t+1,L[id[i]])-X;
		int B=lower_bound(X+1,X+t+1,R[id[i]])-X;
		a[A]=B;
	}
	rep(i,1,t)
		if(a[i]){
			res+=qry(a[i])-qry(i);
			if(res>aim)return aim+1;
			upd(a[i],1);
		}
	return res;
}

set<pair<ld,int> > s;
int push(int u,int v){
	ld x=(b[u]-b[v])/(k[v]-k[u]);
	ld d=mo(x-ox,k[u]*x+b[u]-oy);
	return d<r-eps?(ans+=d,acc++,1):0;
}
void solve(){
	sort(id+1,id+cnt+1,[&](int a,int b){
		return L[a]<L[b];
	});
	rep(i,1,cnt){
		auto it=s.lower_bound(mp(L[id[i]],0));
		for(;it!=s.end()&&it->fi<R[id[i]];it++)
			if(!push(id[i],it->se))break;
		s.insert(mp(R[id[i]],id[i]));
	}
}

int main(){
	scanf("%d",&n);
	scanf("%lf%lf%d",&ox,&oy,&aim);
	ox/=1000,oy/=1000;
	rep(i,1,n){
		scanf("%lf%lf",&k[i],&b[i]);
		k[i]/=1000,b[i]/=1000;
		ld A=k[i],B=-1,C=b[i];
		d[i]=fabs(A*ox+B*oy+C)/mo(A,B);
		dir[i]=atan(k[i])+(cmp(oy,k[i]*ox+b[i])<0?Pi/2:-Pi/2);
	}
	while(r-l>eps*l){
		ld mid=(l+r)*0.5;
		create(mid);
		if(calc()<aim)l=mid;
		else r=mid;
	}
	r=l,create(r),solve();
	ans+=(aim-acc)*r;
	printf("%.8lf\n",(double)ans);
	return 0;
}


#include<bits/stdc++.h>
#define rep(i,a,b) for(int i=(a);i<=(b);i++)
#define clr(x) memset(x,0,sizeof x)
#define fi first
#define se second
#define mp make_pair
using namespace std;
typedef double ld;

const ld eps=5e-7,Pi=acos(-1);
ld mo(ld x,ld y){return sqrt(x*x+y*y);}
ld fix(ld a){return a>Pi?a-2*Pi:(a<-Pi?a+2*Pi:a);}
int cmp(ld a,ld b){return fabs(a-b)<eps?0:a<b?-1:1;}

const int N=100005;
ld d[N],k[N],b[N],dir[N],L[N],R[N],X[N],ox,oy,l,r=1e10,ans;
int id[N],n,cnt,aim,acc;

void create(ld r){
	cnt=0;
	rep(i,1,n){
		if(d[i]>r)continue;
		ld de=acos(d[i]/r);
		L[i]=fix(dir[i]-de);
		R[i]=fix(dir[i]+de);
		if(L[i]>R[i])swap(L[i],R[i]);
		id[++cnt]=i;
	}
}

int a[N],c[N];
void upd(int x,int y){
	for(;x<N;x+=x&-x)c[x]+=y;
}
int qry(int x){
	int res=0;
	for(;x;x-=x&-x)res+=c[x];
	return res;
}
int calc(){
	int res=0,t=0; clr(c),clr(a);
	rep(i,1,cnt) X[++t]=L[id[i]],X[++t]=R[id[i]];
	sort(X+1,X+t+1);
	rep(i,1,cnt){
		int A=lower_bound(X+1,X+t+1,L[id[i]])-X;
		int B=lower_bound(X+1,X+t+1,R[id[i]])-X;
		a[A]=B;
	}
	rep(i,1,t)
		if(a[i]){
			res+=qry(a[i])-qry(i);
			if(res>aim)return aim+1;
			upd(a[i],1);
		}
	return res;
}

set<pair<ld,int> > s;
int push(int u,int v){
	ld x=(b[u]-b[v])/(k[v]-k[u]);
	ld d=mo(x-ox,k[u]*x+b[u]-oy);
	return d<r-eps?(ans+=d,acc++,1):0;
}
void solve(){
	sort(id+1,id+cnt+1,[&](int a,int b){
		return L[a]<L[b];
	});
	rep(i,1,cnt){
		auto it=s.lower_bound(mp(L[id[i]],0));
		for(;it!=s.end()&&it->fi<R[id[i]];it++)
			if(!push(id[i],it->se))break;
		s.insert(mp(R[id[i]],id[i]));
	}
}

int main(){
	scanf("%d",&n);
	scanf("%lf%lf%d",&ox,&oy,&aim);
	ox/=1000,oy/=1000;
	rep(i,1,n){
		scanf("%lf%lf",&k[i],&b[i]);
		k[i]/=1000,b[i]/=1000;
		ld A=k[i],B=-1,C=b[i];
		d[i]=fabs(A*ox+B*oy+C)/mo(A,B);
		dir[i]=atan(k[i])+(cmp(oy,k[i]*ox+b[i])<0?Pi/2:-Pi/2);
	}
	while(r-l>eps*r){
		ld mid=(l+r)*0.5;
		create(mid);
		if(calc()<aim)l=mid;
		else r=mid;
	}
	r=l,create(r),solve();
	ans+=(aim-acc)*r;
	printf("%.8lf\n",(double)ans);
	return 0;
}


#include<bits/stdc++.h>
#define rep(i,a,b) for(int i=(a);i<=(b);i++)
#define per(i,a,b) for(int i=(a);i>=(b);i--)
#define REP(i,n) for(int i=(0);i<(n);i++)
#define qwq(x) cerr<<"# "<<#x<<" = "<<x<<endl
#define pr(x) printf("## %s  %.6Lf\n",#x,x)
#define clr(x) memset(x,0,sizeof x)
#define fi first
#define se second
#define pb push_back
#define mp make_pair
using namespace std;
typedef pair<int,int> pii;
typedef vector<int> vi;
typedef long long ll;
typedef double ld;

template<class T> inline void read(T &x){
	int f=0;x=0;char ch=getchar();
	for(;!isdigit(ch);ch=getchar())f|=(ch=='-');
	for(;isdigit(ch);ch=getchar())x=x*10+ch-'0';
	if(f)x=-x;
}

const ld eps=1e-12;
const ld Pi=acos(-1);
ld mo(ld x,ld y){
	return sqrt(x*x+y*y);
}
ld fix(ld a){
	return a>Pi?a-2*Pi:(a<-Pi?a+2*Pi:a);
}
int cmp(ld a,ld b){
	return fabs(a-b)<eps?0:a<b?-1:1;
}

const int N=100005;
ld d[N],k[N],b[N],dir[N],L[N],R[N],X[N],ox,oy,l,r=1e10,ans;
int id[N],n,cnt,aim,acc;

void create(ld r){
	cnt=0;
	rep(i,1,n){
		if(d[i]>r)continue;
		ld delta=acos(d[i]/r);
		L[i]=fix(dir[i]-delta);
		R[i]=fix(dir[i]+delta);
		if(L[i]>R[i])swap(L[i],R[i]);
		id[++cnt]=i;
	}
}

int a[N],c[N];
#define lb(x) (x&-x)
void upd(int x,int y){
	for(;x<N;x+=lb(x))c[x]+=y;
}
int qry(int x){
	int res=0;
	for(;x;x-=lb(x))res+=c[x];
	return res;
}
int calc(){
	int res=0,t=0; clr(c),clr(a);
	rep(i,1,cnt) X[++t]=L[id[i]],X[++t]=R[id[i]];
	sort(X+1,X+t+1);
	rep(i,1,cnt){
		int A=lower_bound(X+1,X+t+1,L[id[i]])-X;
		int B=lower_bound(X+1,X+t+1,R[id[i]])-X;
		a[A]=B;
	}
	rep(i,1,t)
		if(a[i]){
			res+=qry(a[i])-qry(i);
			if(res>aim)return aim+1;
			upd(a[i],1);
		}
	return res;
}

set<pair<ld,int> > s;
int push(int u,int v){
	ld x=(b[u]-b[v])/(k[v]-k[u]);
	ld d=mo(x-ox,k[u]*x+b[u]-oy);
	return d<r-eps?(ans+=d,acc++,1):0;
}
void solve(){
	sort(id+1,id+cnt+1,[&](int a,int b){
		return L[a]<L[b];
	});
	rep(i,1,cnt){
		auto it=s.lower_bound(mp(L[id[i]],0));
		for(;it!=s.end()&&it->fi<R[id[i]];it++)
			if(!push(id[i],it->se))break;
		s.insert(mp(R[id[i]],id[i]));
	}
}

int main(){
	read(n);
	read(ox),read(oy),read(aim);
	ox/=1000,oy/=1000;
	rep(i,1,n){
		read(k[i]),read(b[i]);
		k[i]/=1000,b[i]/=1000;
		ld A=k[i],B=-1,C=b[i];
		d[i]=fabs(A*ox+B*oy+C)/mo(A,B);
		dir[i]=atan(k[i])+(cmp(oy,k[i]*ox+b[i])<0?Pi/2:-Pi/2);
	}
	REP(T,60){
		ld mid=(l+r)*0.5;
		create(mid);
		if(calc()<aim)l=mid;
		else r=mid;
	}
	create(r),solve();
	ans+=(aim-acc)*r;
	printf("%.8lf\n",(double)ans);
	return 0;
}


#include<bits/stdc++.h>
#define rep(i,a,b) for(int i=(a);i<=(b);i++)
#define clr(x) memset(x,0,sizeof x)
#define fi first
#define se second
#define mp make_pair
using namespace std;
typedef double ld;

const ld eps=1e-6,Pi=acos(-1);
ld mo(ld x,ld y){return sqrt(x*x+y*y);}
ld fix(ld a){return a>Pi?a-2*Pi:(a<-Pi?a+2*Pi:a);}
int cmp(ld a,ld b){return fabs(a-b)<eps?0:a<b?-1:1;}

const int N=100005;
ld d[N],k[N],b[N],dir[N],L[N],R[N],X[N],ox,oy,l,r=1e10,ans;
int id[N],n,cnt,aim,acc;

void create(ld r){
	cnt=0;
	rep(i,1,n){
		if(d[i]>r)continue;
		ld de=acos(d[i]/r);
		L[i]=fix(dir[i]-de);
		R[i]=fix(dir[i]+de);
		if(L[i]>R[i])swap(L[i],R[i]);
		id[++cnt]=i;
	}
}

int a[N],c[N];
void upd(int x,int y){
	for(;x<N;x+=x&-x)c[x]+=y;
}
int qry(int x){
	int res=0;
	for(;x;x-=x&-x)res+=c[x];
	return res;
}
int calc(){
	int res=0,t=0; clr(c),clr(a);
	rep(i,1,cnt) X[++t]=L[id[i]],X[++t]=R[id[i]];
	sort(X+1,X+t+1);
	rep(i,1,cnt){
		int A=lower_bound(X+1,X+t+1,L[id[i]])-X;
		int B=lower_bound(X+1,X+t+1,R[id[i]])-X;
		a[A]=B;
	}
	rep(i,1,t)
		if(a[i]){
			res+=qry(a[i])-qry(i);
			if(res>aim)return aim+1;
			upd(a[i],1);
		}
	return res;
}

set<pair<ld,int> > s;
int push(int u,int v){
	ld x=(b[u]-b[v])/(k[v]-k[u]);
	ld d=mo(x-ox,k[u]*x+b[u]-oy);
	return d<r-eps?(ans+=d,acc++,1):0;
}
void solve(){
	sort(id+1,id+cnt+1,[&](int a,int b){
		return L[a]<L[b];
	});
	rep(i,1,cnt){
		auto it=s.lower_bound(mp(L[id[i]],0));
		for(;it!=s.end()&&it->fi<R[id[i]];it++)
			if(!push(id[i],it->se))break;
		s.insert(mp(R[id[i]],id[i]));
	}
}

int main(){
	scanf("%d",&n);
	scanf("%lf%lf%d",&ox,&oy,&aim);
	ox/=1000,oy/=1000;
	rep(i,1,n){
		scanf("%lf%lf",&k[i],&b[i]);
		k[i]/=1000,b[i]/=1000;
		ld A=k[i],B=-1,C=b[i];
		d[i]=fabs(A*ox+B*oy+C)/mo(A,B);
		dir[i]=atan(k[i])+(cmp(oy,k[i]*ox+b[i])<0?Pi/2:-Pi/2);
	}
	while(r-l>eps){
		ld mid=(l+r)*0.5;
		create(mid);
		if(calc()<aim)l=mid;
		else r=mid;
	}
	r=l,create(r),solve();
	ans+=(aim-acc)*r;
	printf("%.8lf\n",(double)ans);
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef long double LD;
const int maxn=50005;
const LD pi=acos(-1);
int n,m;
LD cx,cy;
struct line{
	LD k,b,fk;
	LD dist(LD x,LD y){
		return fabs(k*x-y+b)/fk;
	}
	void get_ang(LD&s,LD&t,LD r){
		LD a=k*k+1,bb=2*k*b-2*cx-2*cy*k,c=cx*cx+b*b+cy*cy-r*r-2*cy*b;
		LD d=sqrt(bb*bb-4*a*c);
		LD x1=(-bb-d)/(2*a),x2=(-bb+d)/(2*a);
		LD y1=k*x1+b,y2=k*x2+b;
		s=atan2(y1-cy,x1-cx);
		t=atan2(y2-cy,x2-cx);
		if(s>t)swap(s,t);
	}
}l[maxn];
struct info{
	LD s,t;
	int i;
	bool operator<(const info&rhs)const{
		return s<rhs.s;
	}
}a[maxn];
LD ra[maxn<<1];
class Splay_Tree{
	int c[maxn<<1],N;
	public:
		void clr(int _n){
			N=_n;
			memset(c,0,N+1<<2);
		}
		void cha(int x){
			for(;x<=N;x+=x&-x)++c[x];
		}
		int qry(int x){
			int ret=0;
			for(;x;x-=x&-x)ret+=c[x];
			return ret;
		}
}tr;
int check(LD r){
	int cnt=0;
	for(int i=1;i<=n;++i)
	if(l[i].dist(cx,cy)<r){
		++cnt;
		l[i].get_ang(a[cnt].s,a[cnt].t,r);
	}
	sort(a+1,a+cnt+1);
	int tot=0;
	for(int i=1;i<=cnt;++i)ra[++tot]=a[i].s,ra[++tot]=a[i].t;
	sort(ra+1,ra+tot+1);
	tot=unique(ra+1,ra+tot+1)-ra-1;
	tr.clr(tot);
	int num=0;
	for(int i=1;i<=cnt;++i){
		int s=lower_bound(ra+1,ra+tot+1,a[i].s)-ra;
		int t=lower_bound(ra+1,ra+tot+1,a[i].t)-ra;
		num+=tr.qry(t)-tr.qry(s-1);
		tr.cha(t);
	}
	return num;
}
struct node{
	LD x; int i;
	node(LD x,int i):x(x),i(i){}
	bool operator<(const node&rhs)const{
		return x<rhs.x||(x==rhs.x&&i<rhs.i);
	}
};
multiset<node>h;
typedef multiset<node>::iterator iter;
LD get_dist(line&l1,line&l2){
	LD k1=l1.k,k2=l2.k,b1=l1.b,b2=l2.b;
	LD x=(b2-b1)/(k1-k2),y=k1*x+b1;
	x-=cx; y-=cy;
	return sqrt(x*x+y*y);
}
const LD jd=1e-10;
LD get_ans(LD r){
	int cnt=0;
	for(int i=1;i<=n;++i)
	if(l[i].dist(cx,cy)<r){
		++cnt;
		l[i].get_ang(a[cnt].s,a[cnt].t,r);
		a[cnt].i=i;
	}
	sort(a+1,a+cnt+1);
	LD ans=0; int _m=0;
	for(int i=1;i<=cnt&&_m<m;++i){
		if(h.size()){
			iter f=h.lower_bound(node(a[i].s+jd,0));
			for(iter it=f;it!=h.end()&&_m<m;++it){
				if(it->x>=a[i].t-jd)break;
				LD dist=get_dist(l[a[i].i],l[it->i]);
				if(dist<r-jd&&_m<m)ans+=dist,++_m;
			}
		}
		h.insert(node(a[i].t,a[i].i));
	}
	return ans+r*(m-_m);
}
int main(){
	scanf("%d",&n);
	int ix,iy;
	scanf("%d%d%d",&ix,&iy,&m);
	cx=ix/1000.0; cy=iy/1000.0;
	for(int i=1;i<=n;++i){
		scanf("%d%d",&ix,&iy);
		l[i].k=ix/1000.0;
		l[i].b=iy/1000.0;
		l[i].fk=sqrt(l[i].k*l[i].k+1);
	}
	LD l=0,r=1e10,mid;
	for(int _=1;_<=100;++_){
		mid=(l+r)*0.5;
		if(check(mid)<=m)l=mid;
		else r=mid;
	}
	cout<<fixed<<setprecision(10)<<get_ans(r)<<endl;
	return 0;
}


#include<bits/stdc++.h>
#define ll              long long
#define pii             pair<int, int>
#define rep(i,a,b)      for(int  i=a;i<=b;i++)
#define dec(i,a,b)      for(int  i=a;i>=b;i--)
#define forn(i, n)      for(int i = 0; i < int(n); i++)
using namespace std;
int dir[4][2] = { { 1,0 },{ 0,1 } ,{ 0,-1 },{ -1,0 } };
const long long INF = 0x7f7f7f7f7f7f7f7f;
const int inf =1e9+5;
const double pi = 3.14159265358979323846;
const double eps = 1e-6;
const int mod = 1e9 + 7;
const int N = 2e5+ 5;
ll gcd(ll m, ll n)
{
    return n == 0 ? m : gcd(n, m % n);
}
ll lcm(ll m, ll n)
{
    return m * n / gcd(m, n);
}
bool prime(int x) {
    if (x < 2) return false;
    for (int i = 2; i * i <= x; ++i) {
        if (x % i == 0) return false;
    }
    return true;
}
ll qpow(ll m, ll k, ll mod)
{
    ll res = 1, t = m;
    while (k)
    {
        if (k & 1)
            res = res * t % mod;
        t = t * t % mod;
        k >>= 1;
    }
    return res;
}
int main()
{
    cin.tie(0);
    cout.tie(0);
    ios::sync_with_stdio(false);
    int t;
    cin>>t;
    while(t--)
    {
        ll l,r,m;
        cin>>l>>r>>m;
        ll res;
        int a,b,c;
        if(m>=l&&m<=r) cout<<m<<' '<<l<<' '<<l<<endl;
        else{
            int flag=0;
           for(int i=l;i<=r;i++)
           {
              if(i<m)
              {
                  res=m%i;
                  if(res>=(l-r)&&res<=(r-l)) {
                  a=i;
                  b=l+res;
                  c=l;
                  flag=1;
                  }
              }
              else if(i>m) {
                res=m-i;
                if(res>=(l-r)&&res<=(r-l)) {
                  a=i;
                  b=r;
                  c=r-res;
                  flag=1;
                  }
              }
              if(flag==1) break;
           }
           cout<<a<<' '<<b<<' '<<c<<endl;
        }
    }
    return 0;
}


#include<bits/stdc++.h>
#define ll              long long
#define pii             pair<int, int>
#define rep(i,a,b)      for(int  i=a;i<=b;i++)
#define dec(i,a,b)      for(int  i=a;i>=b;i--)
#define forn(i, n)      for(int i = 0; i < int(n); i++)
using namespace std;
int dir[4][2] = { { 1,0 },{ 0,1 } ,{ 0,-1 },{ -1,0 } };
const long long INF = 0x7f7f7f7f7f7f7f7f;
const int inf =1e9+5;
const double pi = 3.14159265358979323846;
const double eps = 1e-6;
const int mod = 1e9 + 7;
const int N = 2e5+ 5;
ll gcd(ll m, ll n)
{
    return n == 0 ? m : gcd(n, m % n);
}
ll lcm(ll m, ll n)
{
    return m * n / gcd(m, n);
}
bool prime(int x) {
    if (x < 2) return false;
    for (int i = 2; i * i <= x; ++i) {
        if (x % i == 0) return false;
    }
    return true;
}
ll qpow(ll m, ll k, ll mod)
{
    ll res = 1, t = m;
    while (k)
    {
        if (k & 1)
            res = res * t % mod;
        t = t * t % mod;
        k >>= 1;
    }
    return res;
}
int main()
{
    cin.tie(0);
    cout.tie(0);
    ios::sync_with_stdio(false);
    int t;
    cin>>t;
    while(t--)
    {
        ll l,r,m;
        cin>>l>>r>>m;
        ll res;
        ll a,b,c;
            int flag=0;
           for(ll i=l;i<=r;i++)
           {
              if(i<=m)
              {
                  res=m%i;
                  if(res>=(l-r)&&res<=(r-l)) {
                  a=i;
                  b=l+res;
                  c=l;
                  flag=1;
                  }
              }
              else if(i>m) {
                res=m-i;
                if(res>=(l-r)&&res<=(r-l)) {
                  a=i;
                  b=l;
                  c=l-res;
                  flag=1;
                  }
              }
              if(flag==1) break;
           }
           cout<<a<<' '<<b<<' '<<c<<endl;
    }
    return 0;
}


#include<bits/stdc++.h>
#define ll              long long
#define pii             pair<int, int>
#define rep(i,a,b)      for(int  i=a;i<=b;i++)
#define dec(i,a,b)      for(int  i=a;i>=b;i--)
#define forn(i, n)      for(int i = 0; i < int(n); i++)
using namespace std;
int dir[4][2] = { { 1,0 },{ 0,1 } ,{ 0,-1 },{ -1,0 } };
const long long INF = 0x7f7f7f7f7f7f7f7f;
const int inf =1e9+5;
const double pi = 3.14159265358979323846;
const double eps = 1e-6;
const int mod = 1e9 + 7;
const int N = 2e5+ 5;
ll gcd(ll m, ll n)
{
    return n == 0 ? m : gcd(n, m % n);
}
ll lcm(ll m, ll n)
{
    return m * n / gcd(m, n);
}
bool prime(int x) {
    if (x < 2) return false;
    for (int i = 2; i * i <= x; ++i) {
        if (x % i == 0) return false;
    }
    return true;
}
ll qpow(ll m, ll k, ll mod)
{
    ll res = 1, t = m;
    while (k)
    {
        if (k & 1)
            res = res * t % mod;
        t = t * t % mod;
        k >>= 1;
    }
    return res;
}
int main()
{
    cin.tie(0);
    cout.tie(0);
    ios::sync_with_stdio(false);
    int t;
    cin>>t;
    while(t--)
    {
        ll l,r,m;
        cin>>l>>r>>m;
        int res;
        int a,b,c;
        int k=m/l;
        a=l;
        if(k==0) {
            res=l-m;
            b=l;
            c=l+res;
        }
        else {
            res=m%l;
            b=r;
            c=r-res;
        }
        cout<<a<<' '<<b<<' '<<c<<endl;
    }
    return 0;
}


#include<bits/stdc++.h>
#define ll              long long
#define pii             pair<int, int>
#define rep(i,a,b)      for(int  i=a;i<=b;i++)
#define dec(i,a,b)      for(int  i=a;i>=b;i--)
#define forn(i, n)      for(int i = 0; i < int(n); i++)
using namespace std;
int dir[4][2] = { { 1,0 },{ 0,1 } ,{ 0,-1 },{ -1,0 } };
const long long INF = 0x7f7f7f7f7f7f7f7f;
const int inf =1e9+5;
const double pi = 3.14159265358979323846;
const double eps = 1e-6;
const int mod = 1e9 + 7;
const int N = 2e5+ 5;
ll gcd(ll m, ll n)
{
    return n == 0 ? m : gcd(n, m % n);
}
ll lcm(ll m, ll n)
{
    return m * n / gcd(m, n);
}
bool prime(int x) {
    if (x < 2) return false;
    for (int i = 2; i * i <= x; ++i) {
        if (x % i == 0) return false;
    }
    return true;
}
ll qpow(ll m, ll k, ll mod)
{
    ll res = 1, t = m;
    while (k)
    {
        if (k & 1)
            res = res * t % mod;
        t = t * t % mod;
        k >>= 1;
    }
    return res;
}
int main()
{
    cin.tie(0);
    cout.tie(0);
    ios::sync_with_stdio(false);
    int t;
    cin>>t;
    while(t--)
    {
        ll l,r,m;
        cin>>l>>r>>m;
        ll res;
        ll a,b,c;
            int flag=0;
           for(ll i=l;i<=r;i++)
           {
              if(i<=m)
              {
                  res=m%i;
                  if(res<=(r-l)) {
                  a=i;
                  b=l+res;
                  c=l;
                  flag=1;
                  }
              }
              else if(i>m) {
                res=i-m%i;
                if(res<=(r-l)) {
                  a=i;
                  b=l;
                  c=l+res;
                  flag=1;
                  }
              }
              if(flag==1)
              {
                   cout<<a<<' '<<b<<' '<<c<<endl;
                  break;
              }
        }
    }
    return 0;
}


#include<bits/stdc++.h>
#define ll              long long
#define pii             pair<int, int>
#define rep(i,a,b)      for(int  i=a;i<=b;i++)
#define dec(i,a,b)      for(int  i=a;i>=b;i--)
#define forn(i, n)      for(int i = 0; i < int(n); i++)
using namespace std;
int dir[4][2] = { { 1,0 },{ 0,1 } ,{ 0,-1 },{ -1,0 } };
const long long INF = 0x7f7f7f7f7f7f7f7f;
const int inf =1e9+5;
const double pi = 3.14159265358979323846;
const double eps = 1e-6;
const int mod = 1e9 + 7;
const int N = 2e5+ 5;
ll gcd(ll m, ll n)
{
    return n == 0 ? m : gcd(n, m % n);
}
ll lcm(ll m, ll n)
{
    return m * n / gcd(m, n);
}
bool prime(int x) {
    if (x < 2) return false;
    for (int i = 2; i * i <= x; ++i) {
        if (x % i == 0) return false;
    }
    return true;
}
ll qpow(ll m, ll k, ll mod)
{
    ll res = 1, t = m;
    while (k)
    {
        if (k & 1)
            res = res * t % mod;
        t = t * t % mod;
        k >>= 1;
    }
    return res;
}
int main()
{
    cin.tie(0);
    cout.tie(0);
    ios::sync_with_stdio(false);
    int t;
    cin>>t;
    while(t--)
    {
        ll l,r,m;
        cin>>l>>r>>m;
        ll res;
        int a,b,c;
        if(m>=l&&m<=r) cout<<m<<' '<<l<<' '<<l<<endl;
        else{
            int flag=0;
           for(int i=l;i<=r;i++)
           {
              if(i<m)
              {
                  res=m%i;
                  if(res>=(l-r)&&res<=(r-l)) {
                  a=i;
                  b=l+res;
                  c=l;
                  flag=1;
                  }
              }
              else if(i>m) {
                res=m-i;
                if(res>=(l-r)&&res<=(r-l)) {
                  a=i;
                  b=l
                  c=l-res;
                  flag=1;
                  }
              }
              if(flag==1) break;
           }
           cout<<a<<' '<<b<<' '<<c<<endl;
        }
    }
    return 0;
}


#include<bits/stdc++.h>
#define ll              long long
#define pii             pair<int, int>
#define rep(i,a,b)      for(int  i=a;i<=b;i++)
#define dec(i,a,b)      for(int  i=a;i>=b;i--)
#define forn(i, n)      for(int i = 0; i < int(n); i++)
using namespace std;
int dir[4][2] = { { 1,0 },{ 0,1 } ,{ 0,-1 },{ -1,0 } };
const long long INF = 0x7f7f7f7f7f7f7f7f;
const int inf =1e9+5;
const double pi = 3.14159265358979323846;
const double eps = 1e-6;
const int mod = 1e9 + 7;
const int N = 2e5+ 5;
ll gcd(ll m, ll n)
{
    return n == 0 ? m : gcd(n, m % n);
}
ll lcm(ll m, ll n)
{
    return m * n / gcd(m, n);
}
bool prime(int x) {
    if (x < 2) return false;
    for (int i = 2; i * i <= x; ++i) {
        if (x % i == 0) return false;
    }
    return true;
}
ll qpow(ll m, ll k, ll mod)
{
    ll res = 1, t = m;
    while (k)
    {
        if (k & 1)
            res = res * t % mod;
        t = t * t % mod;
        k >>= 1;
    }
    return res;
}
int main()
{
    cin.tie(0);
    cout.tie(0);
    ios::sync_with_stdio(false);
    int t;
    cin>>t;
    while(t--)
    {
        ll l,r,m;
        cin>>l>>r>>m;
        ll res;
        int a,b,c;
        if(m>=l&&m<=r) cout<<m<<' '<<l<<' '<<l<<endl;
        else{
            int flag=0;
           for(int i=l;i<=r;i++)
           {
              if(i<m)
              {
                  res=m%i;
                  if(res>=(l-r)&&res<=(r-l)) {
                  a=i;
                  b=r;
                  c=r-res;
                  flag=1;
                  }
              }
              else if(i>m) {
                res=m-i;
                if(res>=(l-r)&&res<=(r-l)) {
                  a=i;
                  b=l;
                  c=l-res;
                  flag=1;
                  }
              }
              if(flag==1) break;
           }
           cout<<a<<' '<<b<<' '<<c<<endl;
        }
    }
    return 0;
}


#include<bits/stdc++.h>
#define ll              long long
#define pii             pair<int, int>
#define rep(i,a,b)      for(int  i=a;i<=b;i++)
#define dec(i,a,b)      for(int  i=a;i>=b;i--)
#define forn(i, n)      for(int i = 0; i < int(n); i++)
using namespace std;
int dir[4][2] = { { 1,0 },{ 0,1 } ,{ 0,-1 },{ -1,0 } };
const long long INF = 0x7f7f7f7f7f7f7f7f;
const int inf =1e9+5;
const double pi = 3.14159265358979323846;
const double eps = 1e-6;
const int mod = 1e9 + 7;
const int N = 2e5+ 5;
ll gcd(ll m, ll n)
{
    return n == 0 ? m : gcd(n, m % n);
}
ll lcm(ll m, ll n)
{
    return m * n / gcd(m, n);
}
bool prime(int x) {
    if (x < 2) return false;
    for (int i = 2; i * i <= x; ++i) {
        if (x % i == 0) return false;
    }
    return true;
}
ll qpow(ll m, ll k, ll mod)
{
    ll res = 1, t = m;
    while (k)
    {
        if (k & 1)
            res = res * t % mod;
        t = t * t % mod;
        k >>= 1;
    }
    return res;
}
int main()
{
    cin.tie(0);
    cout.tie(0);
    ios::sync_with_stdio(false);
    int t;
    cin>>t;
    while(t--)
    {
        ll l,r,m;
        cin>>l>>r>>m;
        ll res;
        ll a,b,c;
            int flag=0;
           for(ll i=l;i<=r;i++)
           {
              if(i<=m)
              {
                  res=m%i;
                  if(res<=(r-l)) {
                  a=i;
                  b=l+res;
                  c=l;
                  flag=1;
                  }
              }
                res=i-m%i;
                if(res<=(r-l)) {
                  a=i;
                  b=l;
                  c=l+res;
                  flag=1;
                  }
              if(flag==1)
              {
                   cout<<a<<' '<<b<<' '<<c<<endl;
                  break;
              }
        }
    }
    return 0;
}


#include<bits/stdc++.h>
#define ll              long long
#define pii             pair<int, int>
#define rep(i,a,b)      for(int  i=a;i<=b;i++)
#define dec(i,a,b)      for(int  i=a;i>=b;i--)
#define forn(i, n)      for(int i = 0; i < int(n); i++)
using namespace std;
int dir[4][2] = { { 1,0 },{ 0,1 } ,{ 0,-1 },{ -1,0 } };
const long long INF = 0x7f7f7f7f7f7f7f7f;
const int inf =1e9+5;
const double pi = 3.14159265358979323846;
const double eps = 1e-6;
const int mod = 1e9 + 7;
const int N = 2e5+ 5;
ll gcd(ll m, ll n)
{
    return n == 0 ? m : gcd(n, m % n);
}
ll lcm(ll m, ll n)
{
    return m * n / gcd(m, n);
}
bool prime(int x) {
    if (x < 2) return false;
    for (int i = 2; i * i <= x; ++i) {
        if (x % i == 0) return false;
    }
    return true;
}
ll qpow(ll m, ll k, ll mod)
{
    ll res = 1, t = m;
    while (k)
    {
        if (k & 1)
            res = res * t % mod;
        t = t * t % mod;
        k >>= 1;
    }
    return res;
}
int main()
{
    cin.tie(0);
    cout.tie(0);
    ios::sync_with_stdio(false);
    int t;
    cin>>t;
    while(t--)
    {
        ll l,r,m;
        cin>>l>>r>>m;
        ll res;
        ll a,b,c;
            int flag=0;
           for(int i=l;i<=r;i++)
           {
              if(i<=m)
              {
                  res=m%i;
                  if(res>=(l-r)&&res<=(r-l)) {
                  a=i;
                  b=l+res;
                  c=l;
                  flag=1;
                  }
              }
              else if(i>m) {
                res=m%i-i;
                if(res>=(l-r)&&res<=(r-l)) {
                  a=i;
                  b=l;
                  c=l-res;
                  flag=1;
                  }
              }
              if(flag==1)
              {
                   cout<<a<<' '<<b<<' '<<c<<endl;
                  break;
              }
        }
    }
    return 0;
}


#include<bits/stdc++.h>
#define ll              long long
#define pii             pair<int, int>
#define rep(i,a,b)      for(int  i=a;i<=b;i++)
#define dec(i,a,b)      for(int  i=a;i>=b;i--)
#define forn(i, n)      for(int i = 0; i < int(n); i++)
using namespace std;
int dir[4][2] = { { 1,0 },{ 0,1 } ,{ 0,-1 },{ -1,0 } };
const long long INF = 0x7f7f7f7f7f7f7f7f;
const int inf =1e9+5;
const double pi = 3.14159265358979323846;
const double eps = 1e-6;
const int mod = 1e9 + 7;
const int N = 2e5+ 5;
ll gcd(ll m, ll n)
{
    return n == 0 ? m : gcd(n, m % n);
}
ll lcm(ll m, ll n)
{
    return m * n / gcd(m, n);
}
bool prime(int x) {
    if (x < 2) return false;
    for (int i = 2; i * i <= x; ++i) {
        if (x % i == 0) return false;
    }
    return true;
}
ll qpow(ll m, ll k, ll mod)
{
    ll res = 1, t = m;
    while (k)
    {
        if (k & 1)
            res = res * t % mod;
        t = t * t % mod;
        k >>= 1;
    }
    return res;
}
int main()
{
    cin.tie(0);
    cout.tie(0);
    ios::sync_with_stdio(false);
    int t;
    cin>>t;
    while(t--)
    {
        ll l,r,m;
        cin>>l>>r>>m;
        ll res;
        int a,b,c;
        if(m>=l&&m<=r) cout<<m<<' '<<l<<' '<<l<<endl;
        else{
            int flag=0;
           for(int i=l;i<=r;i++)
           {
              if(i<m)
              {
                  res=m%i;
                  if(res>=(l-r)&&res<=(r-l)) {
                  a=i;
                  b=l+res;
                  c=l;
                  flag=1;
                  }
              }
              else if(i>m) {
                res=m-i;
                if(res>=(l-r)&&res<=(r-l)) {
                  a=i;
                  b=l;
                  c=l-res;
                  flag=1;
                  }
              }
              if(flag==1) break;
           }
           cout<<a<<' '<<b<<' '<<c<<endl;
        }
    }
    return 0;
}


#include <bits/stdc++.h>
using ll = long long;
using ld = long double;
using ull = unsigned long long;
using namespace std;

void test_case() {
	ll l, r, m;
	cin >> l >> r >> m;
	ll max_diff = r - l;
	for (int a = l; a <= r; a++) {
		ll n = (m+max_diff)/a;
		if (n*a >= m-max_diff && n*a <= m+max_diff) {
			ll b, c, diff = m - n*a;
			if (diff > 0) {
				b = l + diff;
				c = l;
			} else {
				c = r;
				b = r + diff;
			}
			cout << a << ' ' << b << ' ' << c << '\n';
			return;
		}
	}
}

int main() {
	ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
	int t;
	cin >> t;
	for (int i = 0; i < t; i++) {
		test_case();
	}
}


#include <bits/stdc++.h>
using ll = long long;
using ld = long double;
using ull = unsigned long long;
using namespace std;

void test_case() {
	ll l, r, m;
	cin >> l >> r >> m;
	for (int a = l; l <= r; a++) {
		int working = m;
		working %= a;
		ll b = r;
		ll c = b - working;
		//cout << "Consider " << a << ' ' << b << ' ' << c << '\n';
		if (m + c - b > 0 && (m + c - b) % a == 0 && c >= l) {
			cout << a << ' ' << b << ' ' << c << '\n';
			return;
		}
		b = l;
		c = b - working + a;
		//cout << "Consider " << a << ' ' << b << ' ' << c << '\n';
		if (m + c - b > 0 && (m + c - b) % a == 0 && c <= r) {
			cout << a << ' ' << b << ' ' << c << '\n';
			return;
		}
		c = r;
		b = c + working - a;
		//cout << "Consider " << a << ' ' << b << ' ' << c << '\n';
		if (m + c - b > 0 && (m + c - b) % a == 0 && c >= l) {
			cout << a << ' ' << b << ' ' << c << '\n';
			return;
		}
		c = l;
		b = c + working;
		//cout << "Consider " << a << ' ' << b << ' ' << c << '\n';
		if (m + c - b > 0 && (m + c - b) % a == 0 && c >= l) {
			cout << a << ' ' << b << ' ' << c << '\n';
			return;
		}
	}
	return;
}

int main() {
	ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
	int t;
	cin >> t;
	for (int i = 0; i < t; i++) {
		test_case();
	}
}


#include <bits/stdc++.h>
using ll = long long;
using ld = long double;
using ull = unsigned long long;
using namespace std;

void test_case() {
	ll l, r, m;
	cin >> l >> r >> m;
	for (int a = l; l <= r; a++) {
		int working = m;
		working %= a;
		ll b = r;
		ll c = b - working;
		//cout << "Consider " << a << ' ' << b << ' ' << c << '\n';
		if (m + c - b > 0 && c >= l) {
			cout << a << ' ' << b << ' ' << c << '\n';
			return;
		}
		b = l;
		c = b - working + a;
		//cout << "Consider " << a << ' ' << b << ' ' << c << '\n';
		if (m + c - b > 0 && c <= r) {
			cout << a << ' ' << b << ' ' << c << '\n';
			return;
		}
		c = r;
		b = c + working - a;
		//cout << "Consider " << a << ' ' << b << ' ' << c << '\n';
		if (m + c - b > 0 && c >= l) {
			cout << a << ' ' << b << ' ' << c << '\n';
			return;
		}
		c = l;
		b = c + working;
		//cout << "Consider " << a << ' ' << b << ' ' << c << '\n';
		if (m + c - b > 0 && c >= l) {
			cout << a << ' ' << b << ' ' << c << '\n';
			return;
		}
	}
	return;
}

int main() {
	ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
	int t;
	cin >> t;
	for (int i = 0; i < t; i++) {
		test_case();
	}
}


#include <bits/stdc++.h>
using ll = long long;
using ld = long double;
using ull = unsigned long long;
using namespace std;

void test_case() {
	ll l, r, m;
	cin >> l >> r >> m;
	for (int a = l; l <= r; a++) {
		int working = m;
		working %= a;
		int b = r;
		int c = b - working;
		//cout << "Consider " << a << ' ' << b << ' ' << c << '\n';
		if (m + c - b > 0 && c >= l) {
			cout << a << ' ' << b << ' ' << c << '\n';
			return;
		}
		b = l;
		c = b - working + a;
		//cout << "Consider " << a << ' ' << b << ' ' << c << '\n';
		if (m + c - b > 0 && b <= r) {
			cout << a << ' ' << b << ' ' << c << '\n';
			return;
		}
	}
	return;
}

int main() {
	ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
	int t;
	cin >> t;
	for (int i = 0; i < t; i++) {
		test_case();
	}
}


#include <bits/stdc++.h>
using ll = long long;
using ld = long double;
using ull = unsigned long long;
using namespace std;

void test_case() {
	ll l, r, m;
	cin >> l >> r >> m;
	for (int a = l; l <= r; a++) {
		int working = m;
		working %= a;
		ll b = r;
		ll c = b - working;
		//cout << "Consider " << a << ' ' << b << ' ' << c << '\n';
		if (m + c - b > 0 && c >= l) {
			cout << a << ' ' << b << ' ' << c << '\n';
			return;
		}
		b = l;
		c = b - working + a;
		//cout << "Consider " << a << ' ' << b << ' ' << c << '\n';
		if (m + c - b > 0 && c <= r) {
			cout << a << ' ' << b << ' ' << c << '\n';
			return;
		}
	}
	return;
}

int main() {
	ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
	int t;
	cin >> t;
	for (int i = 0; i < t; i++) {
		test_case();
	}
}


#include <bits/stdc++.h>
using ll = long long;
using ld = long double;
using ull = unsigned long long;
using namespace std;

void test_case() {
	ll l, r, m;
	cin >> l >> r >> m;
	for (int a = l; l <= r; a++) {
		int working = m;
		working %= a;
		int b = r;
		int c = b - working;
		cout << "Consider " << a << ' ' << b << ' ' << c << '\n';
		if (m + c - b > 0 && c >= l) {
			cout << a << ' ' << b << ' ' << c << '\n';
			return;
		}
		b = l;
		c = b - working + a;
		cout << "Consider " << a << ' ' << b << ' ' << c << '\n';
		if (m + c - b > 0 && b <= r) {
			cout << a << ' ' << b << ' ' << c << '\n';
			return;
		}
	}
	return;
}

int main() {
	ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
	int t;
	cin >> t;
	for (int i = 0; i < t; i++) {
		test_case();
	}
}


#include<iostream>
using namespace std;
int main(){
	int T;
	cin>>T;
	while(T--){
		long long l,r,m;
		cin>>l>>r>>m;
		long long minn=m+l-r,maxx=m+r-l;
		for(long long i=l;i<=r;i++){
			if(minn%i==0&&minn!=0){
				cout<<i<<' '<<r<<' '<<l<<endl;
				break;
			}
			else if(minn-minn%i+i<=maxx){
				long long kkk=minn-minn%i+i,b,c;
				if(kkk==0)continue;
				if(kkk<m)b=m-kkk+l,c=l;
				else if(kkk==m)b=c=l;
				else if(kkk>m) b=r-kkk+m,c=r;
				cout<<i<<' '<<b<<' '<<c<<endl;break;
			}
		}
	}
	return 0;
}


#include<iostream>
using namespace std;
int main(){
	int T;
	cin>>T;
	while(T--){
		long long l,r,m;
		cin>>l>>r>>m;
		long long minn=m+l-r,maxx=m+r-l;
		for(long long i=l;i<=r;i++){
			if(minn-minn%i+i<=maxx){
				long long kkk=minn-minn%i+i,b,c;
				if(kkk==0)continue;
				if(kkk<m)b=m-kkk+l,c=l;
				else if(kkk==m)b=c=l;
				else if(kkk>m) b=r-kkk+m,c=r;
				cout<<i<<' '<<b<<' '<<c<<endl;break;
			}
		}
	}
	return 0;
}


#include<iostream>
using namespace std;
int main(){
	int T;
	cin>>T;
	while(T--){
		long long l,r,m;
		cin>>l>>r>>m;
		long long minn=m+l-r,maxx=m+r-l;
		for(long long i=l;i<=r;i++){
			if(minn%i==0&&minn!=0){
				cout<<i<<' '<<l<<' '<<l<<endl;
			}
			else if(minn-minn%i+i<=maxx){
				long long kkk=minn-minn%i+i,b,c;
				if(kkk==0)continue;
				if(kkk<m)b=m-kkk+l,c=l;
				else if(kkk==m)b=c=l;
				else if(kkk>m) b=r-kkk+m,c=r;
				cout<<i<<' '<<b<<' '<<c<<endl;break;
			}
		}
	}
	return 0;
}


#include<iostream>
using namespace std;
int main(){
	int T;
	cin>>T;
	while(T--){
		long long l,r,m;
		cin>>l>>r>>m;
		long long minn=m+l-r,maxx=m+r-l;
		for(long long i=l;i<=r;i++){
			if(minn%i==0){
				if(minn!=0){
					cout<<i<<' '<<l<<' '<<l<<endl;
				}
			}
			else if(minn-minn%i+i<=maxx){
				long long kkk=minn-minn%i+i,b,c;
				if(kkk==0)continue;
				if(kkk<m)b=m-kkk+l,c=l;
				else if(kkk==m)b=c=l;
				else if(kkk>m) b=r-kkk+m,c=r;
				cout<<i<<' '<<b<<' '<<c<<endl;break;
			}
		}
	}
	return 0;
}


#include<iostream>
using namespace std;
int main(){
	int T;
	cin>>T;
	while(T--){
		long long l,r,m;
		cin>>l>>r>>m;
		long long minn=m+l-r,maxx=m+r-l;
		for(long long i=l;i<=r;i++){
			if(minn-minn%i+i<=maxx){
				long long kkk=minn-minn%i+i,b,c;
				if(kkk==0)continue;
				if(kkk<m)b=m-kkk+l,c=l;
				else if(kkk==m)b=c=l;
				else if(kkk>m) b=l,c=kkk-m+l;
				cout<<i<<' '<<b<<' '<<c<<endl;break;
			}
		}
	}
	return 0;
}


#include<iostream>
using namespace std;
int main(){
	int T;
	cin>>T;
	while(T--){
		long long l,r,m;
		cin>>l>>r>>m;
		int minn=m+l-r,maxx=m+r-l;
		for(int i=l;i<=r;i++){
			if(minn-minn%i+i<=maxx){
				cout<<i<<' ';
				int kkk=minn-minn%i+i;
				if(kkk<m)cout<<m-kkk+l<<' '<<l<<endl;
				else if(kkk==m)cout<<l<<' '<<l<<endl;
				else cout<<l<<' '<<kkk-m+l<<endl;
				break;
			}
		}
	}
	return 0;
}


#include<iostream>
using namespace std;
int main(){
	int T;
	cin>>T;
	while(T--){
		long long l,r,m;
		cin>>l>>r>>m;
		long long minn=m+l-r,maxx=m+r-l;
		for(long long i=l;i<=r;i++){
			if(minn-minn%i+i<=maxx){
				int kkk=minn-minn%i+i,b,c;
				if(kkk==0)continue;
				if(kkk<m)b=m-kkk+l,c=l;
				else if(kkk==m)b=c=l;
				else if(kkk>m) b=l,c=kkk-m+l;
				cout<<i<<' '<<b<<' '<<c<<endl;break;
			}
		}
	}
	return 0;
}


#include<iostream>
using namespace std;
int main(){
	int T;
	cin>>T;
	while(T--){
		long long l,r,m;
		cin>>l>>r>>m;
		int minn=m+l-r,maxx=m+r-l;
		for(int i=l;i<=r;i++){
			if(minn-minn%i+i<=maxx){
				bool bj=1;
				int kkk=minn-minn%i+i,b,c;
				if(kkk==0)continue;
				if(kkk<m&&m-kkk+1<=r)b=m-kkk+l,c=l;
				else if(kkk==m)b=c=l;
				else if(kkk>m&&kkk-m+l<=r) b=l,c=kkk-m+l;
				else bj=0;
				if(bj==1){
					cout<<i<<' '<<b<<' '<<c<<endl;break;
				}
			}
		}
	}
	return 0;
}


#include<iostream>
using namespace std;
int main(){
	int T;
	cin>>T;
	while(T--){
		long long l,r,m;
		cin>>l>>r>>m;
		int minn=m+l-r,maxx=m+r-l;
		for(int i=l;i<=r;i++){
			if(minn-minn%i+i<=maxx){
				cout<<i<<' ';
				bool bj=1;
				int kkk=minn-minn%i+i;
				if(kkk<m&&m-kkk+1<=r)cout<<m-kkk+l<<' '<<l<<endl;
				else if(kkk==m)cout<<l<<' '<<l<<endl;
				else if(kkk>m&&kkk-m+l<=r) cout<<l<<' '<<kkk-m+l<<endl;
				else bj=0;
				if(bj==1)break;
			}
		}
	}
	return 0;
}


#include<iostream>
using namespace std;
int main(){
	int T;
	cin>>T;
	while(T--){
		long long l,r,m;
		cin>>l>>r>>m;
		long long minn=m+l-r,maxx=m+r-l;
		for(long long i=l;i<=r;i++){
			if(minn%i==0&&minn!=0){
				cout<<i<<' '<<r<<' '<<l<<endl;
			}
			else if(minn-minn%i+i<=maxx){
				long long kkk=minn-minn%i+i,b,c;
				if(kkk==0)continue;
				if(kkk<m)b=m-kkk+l,c=l;
				else if(kkk==m)b=c=l;
				else if(kkk>m) b=r-kkk+m,c=r;
				cout<<i<<' '<<b<<' '<<c<<endl;break;
			}
		}
	}
	return 0;
}


#include<bits/stdc++.h>
#define ll long long
#define ios ios::sync_with_stdio(false);cin.tie(0); cout.tie(0);
using namespace std;
const int maxn=1e2+5,INF=0x3f3f3f3f;
int main()
{
    ios;
    int t;
    cin>>t;
    while(t--)
    {
        ll l,r,m;
        cin>>l>>r>>m;
        ll w=r-l;
        for(int i=l;i<=r;i++)
            if(m%i<=w&&m/i!=0)
            {
                cout<<i<<" "<<r<<" "<<r-m%i<<endl;
                break;
            }
            else if(m%i<=w&&m/i==0)
            {
                cout<<i<<" "<<l<<" "<<l+m%i<<endl;
                break;
            }
    }
    return 0;
}


#include<bits/stdc++.h>
#define ll long long
#define ios ios::sync_with_stdio(false);cin.tie(0); cout.tie(0);
using namespace std;
const int maxn=1e2+5,INF=0x3f3f3f3f;
int main()
{
    ios;
    int t;
    cin>>t;
    while(t--)
    {
        ll l,r,m;
        cin>>l>>r>>m;
        ll w=r-l;
        for(int i=l;i<=r;i++)
        {
            if(m%i<=w&&m/i!=0)
            {
                cout<<i<<" "<<l+m%i<<" "<<l<<endl;
                break;
            }
            if(i-m<=w&&m/i==0)
            {
                cout<<i<<" "<<l<<" "<<l+i-m<<endl;
                break;
            }
        }
    }
    return 0;
}


#include<bits/stdc++.h>
#define ll long long
using namespace std;
const int maxn=55,INF=0x3f3f3f3f;
string s,s1="abacaba";
int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        int n,ans=0;
        cin>>n;
        cin>>s;
        for(int i=0;i<n-6;i++)
            if(s.substr(i,7)==s1)
                ans++;
        if(ans==0)
        for(int i=0;i<n-6;i++)
            {
                int j;
                for(j=i;j<i+7;j++)
                    if(s[j]==s1[j-i])
                        continue;
                    else if(s[j]=='?')
                        continue;
                    else break;
                if(j==i+7)
                {
                    ans++;
                    for(int z=i;z<j;z++)
                        s[z]=s1[z-i];
                    break;
                }
            }
        for(int i=0;i<n;i++)
            if(s[i]=='?')
            s[i]='z';
        if(ans==1)
        {
            cout<<"Yes"<<endl;
            cout<<s<<endl;
        }
        else cout<<"No"<<endl;
    }
    return 0;
}


#include<bits/stdc++.h>
#define ll long long
#define ios ios::sync_with_stdio(false);cin.tie(0); cout.tie(0);
using namespace std;
const int maxn=1e2+5,INF=0x3f3f3f3f;
int main()
{
    ios;
    int t;
    cin>>t;
    while(t--)
    {
        ll l,r,m;
        cin>>l>>r>>m;
        ll w=r-l;
        for(int i=l;i<=r;i++)
        {
            if((m%i<=w||i-m%i<=w)&&m>=i)
            {
                cout<<i<<" "<<r<<" "<<r-m%i<<endl;
                break;
            }
            if(i-m<=w&&i>=m)
            {
                cout<<i<<" "<<r-i+m<<" "<<r<<endl;
                break;
            }
        }
    }
    return 0;
}


#include<bits/stdc++.h>
#define ll long long
using namespace std;
const int maxn=5e5+4,INF=0x3f3f3f3f;
int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        ll l,r,m,a=0,b=0,c=0;
        int ok=0;
        cin>>l>>r>>m;
        for(int i=l;i<=r;i++)
            {
            for(int j=r-l;j>=l-r;j++)
            if((m+j)%i==0&&m+j!=0)
            {
                ok=1;
                a=i;
                if(j<0)
                {
                    b=r;
                    c=j+r;
                }
                else
                {
                    b=l;
                    c=j+l;
                }
                break;
            }
            if(ok==1)
                break;
            }
        cout<<a<<" "<<b<<" "<<c<<endl;
    }
	return 0;
}


#include<bits/stdc++.h>
#define ll long long
using namespace std;
const int maxn=5e5+4,INF=0x3f3f3f3f;
int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        ll l,r,m,a=0,b=0,c=0;
        int ok=0;
        cin>>l>>r>>m;
        for(int i=l;i<=r;i++)
            {
            for(int j=l-r;j<=r-l;j++)
            if((m+j)%i==0)
            {
                ok=1;
                a=i;
                if(j<0)
                {
                    b=r;
                    c=j+r;
                }
                else
                {
                    b=l;
                    c=j+l;
                }
                break;
            }
            if(ok==1)
                break;
            }
        cout<<a<<" "<<b<<" "<<c<<endl;
    }
	return 0;
}


#include<bits/stdc++.h>
#define ll long long
#define ios ios::sync_with_stdio(false);cin.tie(0); cout.tie(0);
using namespace std;
const int maxn=1e2+5,INF=0x3f3f3f3f;
int main()
{
    ios;
    int t;
    cin>>t;
    while(t--)
    {
        ll l,r,m;
        cin>>l>>r>>m;
        ll w=r-l;
        for(int i=l;i<=r;i++)
        {
            if(m%i<=w&&m/i!=0)
            {
                cout<<i<<" "<<r<<" "<<r-m%i<<endl;
                break;
            }
            if(i-m<=w&&m/i==0)
            {
                cout<<i<<" "<<l<<" "<<l+i-m<<endl;
                break;
            }
        }
    }
    return 0;
}


#include<bits/stdc++.h>
#define ll long long
#define ios ios::sync_with_stdio(false);cin.tie(0); cout.tie(0);
using namespace std;
const int maxn=1e2+5,INF=0x3f3f3f3f;
int main()
{
    ios;
    int t;
    cin>>t;
    while(t--)
    {
        ll l,r,m;
        cin>>l>>r>>m;
        ll w=r-l;
        for(int i=l;i<=r;i++)
            if(m%i<=w&&m/i!=0)
            {
                cout<<i<<" "<<r<<" "<<r-m%i<<endl;
                break;
            }
            else if(m-m%i<=w&&m/i==0)
            {
                cout<<i<<" "<<l<<" "<<l+m%i<<endl;
                break;
            }
    }
    return 0;
}


#include<bits/stdc++.h>
#define ll long long
#define ios ios::sync_with_stdio(false);cin.tie(0); cout.tie(0);
using namespace std;
const int maxn=1e2+5,INF=0x3f3f3f3f;
int main()
{
    ios;
    int t;
    cin>>t;
    while(t--)
    {
        ll l,r,m;
        cin>>l>>r>>m;
        ll w=r-l;
        for(int i=l;i<=r;i++)
        {
            if((m%i<=w||m-m%i<=w)&&m>=i)
            {
                cout<<i<<" "<<r<<" "<<r-m%i<<endl;
                break;
            }
            if(i-m<=w&&i>=m)
            {
                cout<<i<<" "<<r-i+m<<" "<<r<<endl;
                break;
            }
        }
    }
    return 0;
}


#include<bits/stdc++.h>
#define ll long long
#define ios ios::sync_with_stdio(false);cin.tie(0); cout.tie(0);
using namespace std;
const int maxn=1e2+5,INF=0x3f3f3f3f;
int main()
{
    ios;
    int t;
    cin>>t;
    while(t--)
    {
        ll l,r,m;
        cin>>l>>r>>m;
        ll w=r-l;
        for(int i=l;i<=r;i++)
        {
            if(m%i<=w&&m>=i)
            {
                cout<<i<<" "<<r<<" "<<r-m%i<<endl;
                break;
            }
            if(i-m<=w&&i>=m)
            {
                cout<<i<<" "<<r-i+m<<" "<<r<<endl;
                break;
            }
        }
    }
    return 0;
}


#include<bits/stdc++.h>
#define ll long long
#define ios ios::sync_with_stdio(false);cin.tie(0); cout.tie(0);
using namespace std;
const int maxn=1e2+5,INF=0x3f3f3f3f;
int main()
{
    ios;
    int t;
    cin>>t;
    while(t--)
    {
        ll l,r,m;
        cin>>l>>r>>m;
        ll w=r-l;
        for(int i=l;i<=r;i++)
        {
            if((m%i<=w||i-m%i<=w)&&m>=i)
            {
                if(r-m%i>=l)
                cout<<i<<" "<<r<<" "<<r-m%i<<endl;
                else
                {
                    if(i-m%i+l<=r)
                        cout<<i<<" "<<l<<" "<<i-m%i+l<<endl;
                    else cout<<i<<" "<<r-i+m%i<<" "<<r<<endl;
                }
                break;
            }
            if(i-m<=w&&i>=m)
            {
                cout<<i<<" "<<r-i+m<<" "<<r<<endl;
                break;
            }
        }
    }
    return 0;
}


#include<bits/stdc++.h>
#define ll long long
using namespace std;
const int maxn=5e5+4,INF=0x3f3f3f3f;
int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        ll l,r,m,a=0,b=0,c=0;
        int ok=0;
        cin>>l>>r>>m;
        for(int i=l;i<=r;i++)
            {
            for(int j=r-l;j>=l-r;j--)
            if((m+j)%i==0&&m+j!=0)
            {
                ok=1;
                a=i;
                if(j<0)
                {
                    b=r;
                    c=j+r;
                }
                else
                {
                    b=l;
                    c=j+l;
                }
                break;
            }
            if(ok==1)
                break;
            }
        cout<<a<<" "<<b<<" "<<c<<endl;
    }
	return 0;
}


#include<bits/stdc++.h>
#define ll long long
#define ios ios::sync_with_stdio(false);cin.tie(0); cout.tie(0);
using namespace std;
const int maxn=1e2+5,INF=0x3f3f3f3f;
int main()
{
    ios;
    int t;
    cin>>t;
    while(t--)
    {
        ll l,r,m;
        cin>>l>>r>>m;
        ll w=r-l;
        for(int i=l;i<=r;i++)
        {
            if(m%i<=w&&m/i!=0)
            {
                cout<<i<<" "<<r<<" "<<r-m%i<<endl;
                break;
            }
            if(m-m%i<=w&&m/i==0)
            {
                cout<<i<<" "<<l<<" "<<l+i-m<<endl;
                break;
            }
        }
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
const int mod=1e9+7;

ll power(ll a,ll b,ll m)
{
    ll res=1;
 while(b)
 {
     if(b&1)res=(res*a)%m;
     a=(a*a)%m;
     b=b/2;
 }
    return res;
}

void solve()
{
    ll l,r,m,i;
    cin>>l>>r>>m;

    for(i=l;i<=r;i++)
    {
     ll res=m%i;
     ll sec=(i-(m%i))%i;
        if(res<=(r-l)&&((m/i)>0))
        {
           // cout<<<res<<" "
         cout<<i<<" "<<l+res<<" "<<l<<endl;
            return ;
        }
        if(sec<=(r-l))
        {
         cout<<i<<" "<<i<<" "<<i+sec<<endl;
            return ;
        }
    }

}

int main()
{
 ios_base::sync_with_stdio(false);
    cin.tie(0);cout.tie(0);

    int t=1;
    cin>>t;
    while(t--)
        solve();
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
const int mod=1e9+7;

ll power(ll a,ll b,ll m)
{
    ll res=1;
 while(b)
 {
     if(b&1)res=(res*a)%m;
     a=(a*a)%m;
     b=b/2;
 }
    return res;
}

void solve()
{
    ll l,r,m,i;
    cin>>l>>r>>m;
    if(m<l)
    {
       ll res=l-m;
        cout<<l<<" "<<l<<" "<<l+res<<endl;
    }
    else{
    for(i=l;i<=r;i++)
    {
     ll res=m%i;
        if(res<=(r-l))
        {
           // cout<<<res<<" "
         cout<<i<<" "<<l+res<<" "<<l<<endl;
            return ;
        }
    }
    }
}

int main()
{
 ios_base::sync_with_stdio(false);
    cin.tie(0);cout.tie(0);

    int t=1;
    cin>>t;
    while(t--)
        solve();
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
const int mod=1e9+7;

ll power(ll a,ll b,ll m)
{
    ll res=1;
 while(b)
 {
     if(b&1)res=(res*a)%m;
     a=(a*a)%m;
     b=b/2;
 }
    return res;
}

void solve()
{
    ll l,r,m,i;
    cin>>l>>r>>m;

    for(i=l;i<=r;i++)
    {
     ll res=m%i;
     ll sec=((i-res)%i+i)%i;
        if(res<=(r-l)&&((m/i)>0))
        {
           // cout<<<res<<" "
         cout<<i<<" "<<l+res<<" "<<l<<endl;
            return ;
        }
        if(sec<=(r-l))
        {
         cout<<i<<" "<<l<<" "<<l+sec<<endl;
            return ;
        }
    }

}

int main()
{
 ios_base::sync_with_stdio(false);
    cin.tie(0);cout.tie(0);

    int t=1;
    cin>>t;
    while(t--)
        solve();
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
const int mod=1e9+7;

ll power(ll a,ll b,ll m)
{
    ll res=1;
 while(b)
 {
     if(b&1)res=(res*a)%m;
     a=(a*a)%m;
     b=b/2;
 }
    return res;
}

void solve()
{
    ll l,r,m,i;
    cin>>l>>r>>m;
    if(m<l)
    {
       int res=l-m;
        cout<<l<<" "<<l<<" "<<l+res<<endl;
    }
    else{
    for(i=l;i<=r;i++)
    {
     ll res=m%i;
        if(res<=(r-l))
        {
           // cout<<<res<<" "
         cout<<i<<" "<<l+res<<" "<<l<<endl;
            return ;
        }
    }
    }
}

int main()
{
 ios_base::sync_with_stdio(false);
    cin.tie(0);cout.tie(0);

    int t=1;
    cin>>t;
    while(t--)
        solve();
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
const int mod=1e9+7;

ll power(ll a,ll b,ll m)
{
    ll res=1;
 while(b)
 {
     if(b&1)res=(res*a)%m;
     a=(a*a)%m;
     b=b/2;
 }
    return res;
}

void solve()
{
    ll l,r,m,i;
    cin>>l>>r>>m;

    for(i=l;i<=r;i++)
    {
     ll res=m%i;
     ll sec=((i-res)%i+i)%i;
        if(res<=(r-l))
        {
           // cout<<<res<<" "
         cout<<i<<" "<<l+res<<" "<<l<<endl;
            return ;
        }
        if(sec<=(r-l))
        {
         cout<<i<<" "<<i<<" "<<i+sec<<endl;
            return ;
        }
    }

}

int main()
{
 ios_base::sync_with_stdio(false);
    cin.tie(0);cout.tie(0);

    int t=1;
    cin>>t;
    while(t--)
        solve();
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
const int mod=1e9+7;

ll power(ll a,ll b,ll m)
{
    ll res=1;
 while(b)
 {
     if(b&1)res=(res*a)%m;
     a=(a*a)%m;
     b=b/2;
 }
    return res;
}

void solve()
{
    ll l,r,m,i;
    cin>>l>>r>>m;

    for(i=l;i<=r;i++)
    {
     ll res=m%i;
     ll sec=((i-res)%i+i)%i;
        if(res<=(r-l)&&((m/i)>0))
        {
           // cout<<<res<<" "
         cout<<i<<" "<<l+res<<" "<<l<<endl;
            return ;
        }
        if(sec<=(r-l))
        {
         cout<<i<<" "<<i<<" "<<i+sec<<endl;
            return ;
        }
    }

}

int main()
{
 ios_base::sync_with_stdio(false);
    cin.tie(0);cout.tie(0);

    int t=1;
    cin>>t;
    while(t--)
        solve();
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
const int mod=1e9+7;

ll power(ll a,ll b,ll m)
{
    ll res=1;
 while(b)
 {
     if(b&1)res=(res*a)%m;
     a=(a*a)%m;
     b=b/2;
 }
    return res;
}

void solve()
{
    ll l,r,m,i;
    cin>>l>>r>>m;
    if(m<l)
    {
       ll res=l-m;
        cout<<l<<" "<<l<<" "<<l+res<<endl;
    }
    else{
    for(i=l;i<=r;i++)
    {
     ll res=m%i;
        if(res<=(r-l)&&((m/i)>0))
        {
           // cout<<<res<<" "
         cout<<i<<" "<<l+res<<" "<<l<<endl;
            return ;
        }
    }
    }
}

int main()
{
 ios_base::sync_with_stdio(false);
    cin.tie(0);cout.tie(0);

    int t=1;
    cin>>t;
    while(t--)
        solve();
}


#include<bits/stdc++.h>

using namespace std;
const int maxn=5000006;

const int N=5000006;

int n;
char now[10]="abacaba";
char str[100];
bool check(int idx)//出现了
{
    int cnt=0;
    for(int i=idx;i<idx+7;i++){
        if(str[i]==now[cnt]){
            cnt++;
        }else continue;
    }
    // cout<<cnt<<endl;
    return cnt==7;
}

int isone()
{
    int cnt=0;
    for(int i=1;i<=n;i++){
        if(check(i))cnt++;
    }
    return cnt;
}

bool get(int idx)
{
    int cnt=0;
    for(int i=0;i<7;i++){
        if(str[idx+i]=='?'||str[idx+i]==now[cnt]){
            cnt++;
            if(cnt==7)return 1;
        }
    }

    return 0;
}
bool OK()
{
    int f=0;
    for(int i=1;i<=n;i++){
        if(get(i)){
            char tmp[10];
            for(int j=0;j<7;j++){
                tmp[j]=str[j+i];
                str[j+i]=now[j];
            }
            if(isone()>=2){
                for(int j=0;j<7;j++){
                    str[j+i]=tmp[j];
                }continue;
            }
            f=1;
        }
    }
    if(f==1){
        for(int i=1;i<=n;i++){
            if(str[i]=='?')str[i]='d';
        }
    }
    return f;
}
int main()
{
    int t;
    scanf("%d",&t);
    while(t--){
        long long l,r,m;
        scanf("%lld%lld%lld",&l,&r,&m);

        for(int a=l;a<=r;a++){
            if(m%a+l<=r){//jiafa
                cout<<a<<" "<<m%a+l<<" "<<l<<endl;break;
            }
            if(a-(m%a)+l<=r){//jianfa
                cout<<a<<" "<<l<<" "<<l+(a-(m%a))<<endl;break;
            }
        }
    }
}


#include<bits/stdc++.h>

using namespace std;
const int maxn=5000006;

const int N=5000006;

int n;
char now[10]="abacaba";
char str[100];
bool check(int idx)//出现了
{
    int cnt=0;
    for(int i=idx;i<idx+7;i++){
        if(str[i]==now[cnt]){
            cnt++;
        }else continue;
    }
    // cout<<cnt<<endl;
    return cnt==7;
}

int isone()
{
    int cnt=0;
    for(int i=1;i<=n;i++){
        if(check(i))cnt++;
    }
    return cnt;
}

bool get(int idx)
{
    int cnt=0;
    for(int i=0;i<7;i++){
        if(str[idx+i]=='?'||str[idx+i]==now[cnt]){
            cnt++;
            if(cnt==7)return 1;
        }
    }

    return 0;
}
bool OK()
{
    int f=0;
    for(int i=1;i<=n;i++){
        if(get(i)){
            char tmp[10];
            for(int j=0;j<7;j++){
                tmp[j]=str[j+i];
                str[j+i]=now[j];
            }
            if(isone()>=2){
                for(int j=0;j<7;j++){
                    str[j+i]=tmp[j];
                }continue;
            }
            f=1;
        }
    }
    if(f==1){
        for(int i=1;i<=n;i++){
            if(str[i]=='?')str[i]='d';
        }
    }
    return f;
}
int main()
{
    int t;
    scanf("%d",&t);
    while(t--){
        long long l,r,m;
        scanf("%lld%lld%lld",&l,&r,&m);

        for(long long a=l;a<=r;a++){
            if(m%a+l<=r){//jiafa
                cout<<a<<" "<<m%a+l<<" "<<l<<endl;break;
            }
            if(a-(m%a)+l<=r){//jianfa
                cout<<a<<" "<<l<<" "<<l+(a-(m%a))<<endl;break;
            }
        }
    }
}


#include<bits/stdc++.h>

using namespace std;
const int maxn=5000006;

const int N=5000006;

int n;
char now[10]="abacaba";
char str[100];
bool check(int idx)//出现了
{
    int cnt=0;
    for(int i=idx;i<idx+7;i++){
        if(str[i]==now[cnt]){
            cnt++;
        }else continue;
    }
    // cout<<cnt<<endl;
    return cnt==7;
}

int isone()
{
    int cnt=0;
    for(int i=1;i<=n;i++){
        if(check(i))cnt++;
    }
    return cnt;
}

bool get(int idx)
{
    int cnt=0;
    for(int i=0;i<7;i++){
        if(str[idx+i]=='?'||str[idx+i]==now[cnt]){
            cnt++;
            if(cnt==7)return 1;
        }
    }

    return 0;
}
bool OK()
{
    int f=0;
    for(int i=1;i<=n;i++){
        if(get(i)){
            char tmp[10];
            for(int j=0;j<7;j++){
                tmp[j]=str[j+i];
                str[j+i]=now[j];
            }
            if(isone()>=2){
                for(int j=0;j<7;j++){
                    str[j+i]=tmp[j];
                }continue;
            }
            f=1;
        }
    }
    if(f==1){
        for(int i=1;i<=n;i++){
            if(str[i]=='?')str[i]='d';
        }
    }
    return f;
}
int main()
{
    int t;
    scanf("%d",&t);
    while(t--){
        long long l,r,m;
        scanf("%lld%lld%lld",&l,&r,&m);

        for(long long a=l;a<=r;a++){
            if(m>=a){
                if(m%a+l<=r){//jiafa
                    cout<<a<<" "<<m%a+l<<" "<<l<<endl;break;
                }
                if(a-(m%a)+l<=r){//jianfa
                    cout<<a<<" "<<l<<" "<<l+(a-(m%a))<<endl;break;
                }
            }else {
                if(a-m<=(r-l)){
                    cout<<a<<" "<<l<<" "<<a-m+l<<endl;
                }
            }

        }
    }
}


#include<bits/stdc++.h>

using namespace std;
const int maxn=5000006;

const int N=5000006;

int n;
char now[10]="abacaba";
char str[100];
bool check(int idx)//出现了
{
    int cnt=0;
    for(int i=idx;i<idx+7;i++){
        if(str[i]==now[cnt]){
            cnt++;
        }else continue;
    }
    // cout<<cnt<<endl;
    return cnt==7;
}

int isone()
{
    int cnt=0;
    for(int i=1;i<=n;i++){
        if(check(i))cnt++;
    }
    return cnt;
}

bool get(int idx)
{
    int cnt=0;
    for(int i=0;i<7;i++){
        if(str[idx+i]=='?'||str[idx+i]==now[cnt]){
            cnt++;
            if(cnt==7)return 1;
        }
    }

    return 0;
}
bool OK()
{
    int f=0;
    for(int i=1;i<=n;i++){
        if(get(i)){
            char tmp[10];
            for(int j=0;j<7;j++){
                tmp[j]=str[j+i];
                str[j+i]=now[j];
            }
            if(isone()>=2){
                for(int j=0;j<7;j++){
                    str[j+i]=tmp[j];
                }continue;
            }
            f=1;
        }
    }
    if(f==1){
        for(int i=1;i<=n;i++){
            if(str[i]=='?')str[i]='d';
        }
    }
    return f;
}
int main()
{
    int t;
    scanf("%d",&t);
    while(t--){
        long long l,r,m;
        scanf("%lld%lld%lld",&l,&r,&m);

        for(long long a=l;a<=r;a++){
            if(m%a+l<=r){//jiafa
                cout<<a<<" "<<l<<" "<<m%a+l<<endl;break;
            }
            if(a-(m%a)+l<=r){//jianfa
                cout<<a<<" "<<l+(a-(m%a))<<" "<<l<<endl;break;
            }
        }
    }
}


#include<bits/stdc++.h>

using namespace std;
const int maxn=5000006;

const int N=5000006;

int n;
char now[10]="abacaba";
char str[100];
bool check(int idx)//出现了
{
    int cnt=0;
    for(int i=idx;i<idx+7;i++){
        if(str[i]==now[cnt]){
            cnt++;
        }else continue;
    }
    // cout<<cnt<<endl;
    return cnt==7;
}

int isone()
{
    int cnt=0;
    for(int i=1;i<=n;i++){
        if(check(i))cnt++;
    }
    return cnt;
}

bool get(int idx)
{
    int cnt=0;
    for(int i=0;i<7;i++){
        if(str[idx+i]=='?'||str[idx+i]==now[cnt]){
            cnt++;
            if(cnt==7)return 1;
        }
    }

    return 0;
}
bool OK()
{
    int f=0;
    for(int i=1;i<=n;i++){
        if(get(i)){
            char tmp[10];
            for(int j=0;j<7;j++){
                tmp[j]=str[j+i];
                str[j+i]=now[j];
            }
            if(isone()>=2){
                for(int j=0;j<7;j++){
                    str[j+i]=tmp[j];
                }continue;
            }
            f=1;
        }
    }
    if(f==1){
        for(int i=1;i<=n;i++){
            if(str[i]=='?')str[i]='d';
        }
    }
    return f;
}
int main()
{
    int t;
    scanf("%d",&t);
    while(t--){
        long long l,r,m;
        scanf("%lld%lld%lld",&l,&r,&m);
        if(m==1){
            cout<<l<<" "<<l<<" "<<l+1<<endl;continue;
        }
        for(int a=l;a<=r;a++){
            if(m%a+l<=r){
                cout<<a<<" "<<m%a+l<<" "<<l<<endl;break;
            }
            if(a-(m%a)+l<=r){
                cout<<a<<" "<<l+(a-(m%a))<<" "<<l<<endl;break;
            }
        }
    }
}


#include<bits/stdc++.h>

using namespace std;
const int maxn=5000006;

const int N=5000006;

int n;
char now[10]="abacaba";
char str[100];
bool check(int idx)//出现了
{
    int cnt=0;
    for(int i=idx;i<idx+7;i++){
        if(str[i]==now[cnt]){
            cnt++;
        }else continue;
    }
    // cout<<cnt<<endl;
    return cnt==7;
}

int isone()
{
    int cnt=0;
    for(int i=1;i<=n;i++){
        if(check(i))cnt++;
    }
    return cnt;
}

bool get(int idx)
{
    int cnt=0;
    for(int i=0;i<7;i++){
        if(str[idx+i]=='?'||str[idx+i]==now[cnt]){
            cnt++;
            if(cnt==7)return 1;
        }
    }

    return 0;
}
bool OK()
{
    int f=0;
    for(int i=1;i<=n;i++){
        if(get(i)){
            char tmp[10];
            for(int j=0;j<7;j++){
                tmp[j]=str[j+i];
                str[j+i]=now[j];
            }
            if(isone()>=2){
                for(int j=0;j<7;j++){
                    str[j+i]=tmp[j];
                }continue;
            }
            f=1;
        }
    }
    if(f==1){
        for(int i=1;i<=n;i++){
            if(str[i]=='?')str[i]='d';
        }
    }
    return f;
}
int main()
{
    int t;
    scanf("%d",&t);
    while(t--){
        long long l,r,m;
        scanf("%lld%lld%lld",&l,&r,&m);
        for(int a=l;a<=r;a++){
            if(m%a+l<=r){
                cout<<a<<" "<<m%a+l<<" "<<l<<endl;break;
            }
        }
    }
}


#include<bits/stdc++.h>

using namespace std;
const int maxn=5000006;

const int N=5000006;

int n;
char now[10]="abacaba";
char str[100];
bool check(int idx)//出现了
{
    int cnt=0;
    for(int i=idx;i<idx+7;i++){
        if(str[i]==now[cnt]){
            cnt++;
        }else continue;
    }
    // cout<<cnt<<endl;
    return cnt==7;
}

int isone()
{
    int cnt=0;
    for(int i=1;i<=n;i++){
        if(check(i))cnt++;
    }
    return cnt;
}

bool get(int idx)
{
    int cnt=0;
    for(int i=0;i<7;i++){
        if(str[idx+i]=='?'||str[idx+i]==now[cnt]){
            cnt++;
            if(cnt==7)return 1;
        }
    }

    return 0;
}
bool OK()
{
    int f=0;
    for(int i=1;i<=n;i++){
        if(get(i)){
            char tmp[10];
            for(int j=0;j<7;j++){
                tmp[j]=str[j+i];
                str[j+i]=now[j];
            }
            if(isone()>=2){
                for(int j=0;j<7;j++){
                    str[j+i]=tmp[j];
                }continue;
            }
            f=1;
        }
    }
    if(f==1){
        for(int i=1;i<=n;i++){
            if(str[i]=='?')str[i]='d';
        }
    }
    return f;
}
int main()
{
    int t;
    scanf("%d",&t);
    while(t--){
        long long l,r,m;
        scanf("%lld%lld%lld",&l,&r,&m);
        if(m==1){
            cout<<l<<" "<<l<<" "<<l+1<<endl;continue;
        }
        for(int a=l;a<=r;a++){
            if(m%a+l<=r){
                cout<<a<<" "<<m%a+l<<" "<<l<<endl;break;
            }
            if(a-(m%a)+l<=r){
                cout<<a<<" "<<l<<" "<<l+(a-(m%a))<<endl;break;
            }
        }
    }
}


#include<bits/stdc++.h>

using namespace std;
const int maxn=5000006;

const int N=5000006;

int n;
char now[10]="abacaba";
char str[100];
bool check(int idx)//出现了
{
    int cnt=0;
    for(int i=idx;i<idx+7;i++){
        if(str[i]==now[cnt]){
            cnt++;
        }else continue;
    }
    // cout<<cnt<<endl;
    return cnt==7;
}

int isone()
{
    int cnt=0;
    for(int i=1;i<=n;i++){
        if(check(i))cnt++;
    }
    return cnt;
}

bool get(int idx)
{
    int cnt=0;
    for(int i=0;i<7;i++){
        if(str[idx+i]=='?'||str[idx+i]==now[cnt]){
            cnt++;
            if(cnt==7)return 1;
        }
    }

    return 0;
}
bool OK()
{
    int f=0;
    for(int i=1;i<=n;i++){
        if(get(i)){
            char tmp[10];
            for(int j=0;j<7;j++){
                tmp[j]=str[j+i];
                str[j+i]=now[j];
            }
            if(isone()>=2){
                for(int j=0;j<7;j++){
                    str[j+i]=tmp[j];
                }continue;
            }
            f=1;
        }
    }
    if(f==1){
        for(int i=1;i<=n;i++){
            if(str[i]=='?')str[i]='d';
        }
    }
    return f;
}
int main()
{
    int t;
    scanf("%d",&t);
    while(t--){
        long long l,r,m;
        scanf("%lld%lld%lld",&l,&r,&m);
        if(m==1){
            cout<<l<<" "<<l<<" "<<l+1<<endl;continue;
        }
        for(int a=l;a<=r;a++){
            if(m%a+l<=r){
                cout<<a<<" "<<m%a+l<<" "<<l<<endl;break;
            }
        }
    }
}


#include<bits/stdc++.h>

using namespace std;
const int maxn=5000006;

const int N=5000006;

int n;
char now[10]="abacaba";
char str[100];
bool check(int idx)//出现了
{
    int cnt=0;
    for(int i=idx;i<idx+7;i++){
        if(str[i]==now[cnt]){
            cnt++;
        }else continue;
    }
    // cout<<cnt<<endl;
    return cnt==7;
}

int isone()
{
    int cnt=0;
    for(int i=1;i<=n;i++){
        if(check(i))cnt++;
    }
    return cnt;
}

bool get(int idx)
{
    int cnt=0;
    for(int i=0;i<7;i++){
        if(str[idx+i]=='?'||str[idx+i]==now[cnt]){
            cnt++;
            if(cnt==7)return 1;
        }
    }

    return 0;
}
bool OK()
{
    int f=0;
    for(int i=1;i<=n;i++){
        if(get(i)){
            char tmp[10];
            for(int j=0;j<7;j++){
                tmp[j]=str[j+i];
                str[j+i]=now[j];
            }
            if(isone()>=2){
                for(int j=0;j<7;j++){
                    str[j+i]=tmp[j];
                }continue;
            }
            f=1;
        }
    }
    if(f==1){
        for(int i=1;i<=n;i++){
            if(str[i]=='?')str[i]='d';
        }
    }
    return f;
}
int main()
{
    int t;
    scanf("%d",&t);
    while(t--){
        long long l,r,m;
        scanf("%lld%lld%lld",&l,&r,&m);

        for(long long a=l;a<=r;a++){
            if(m>=a){
                if(m%a+l<=r){//jiafa
                    cout<<a<<" "<<m%a+l<<" "<<l<<endl;break;
                }
                if(a-(m%a)+l<=r){//jianfa
                    cout<<a<<" "<<l<<" "<<l+(a-(m%a))<<endl;break;
                }
            }else {
                if(a-m<=(r-l)){
                    cout<<a<<" "<<l<<" "<<a-m+l<<endl;break;
                }
            }

        }
    }
}


#include<bits/stdc++.h>

using namespace std;
const int maxn=5000006;

const int N=5000006;

int n;
char now[10]="abacaba";
char str[100];
bool check(int idx)//出现了
{
    int cnt=0;
    for(int i=idx;i<idx+7;i++){
        if(str[i]==now[cnt]){
            cnt++;
        }else continue;
    }
    // cout<<cnt<<endl;
    return cnt==7;
}

int isone()
{
    int cnt=0;
    for(int i=1;i<=n;i++){
        if(check(i))cnt++;
    }
    return cnt;
}

bool get(int idx)
{
    int cnt=0;
    for(int i=0;i<7;i++){
        if(str[idx+i]=='?'||str[idx+i]==now[cnt]){
            cnt++;
            if(cnt==7)return 1;
        }
    }

    return 0;
}
bool OK()
{
    int f=0;
    for(int i=1;i<=n;i++){
        if(get(i)){
            char tmp[10];
            for(int j=0;j<7;j++){
                tmp[j]=str[j+i];
                str[j+i]=now[j];
            }
            if(isone()>=2){
                for(int j=0;j<7;j++){
                    str[j+i]=tmp[j];
                }continue;
            }
            f=1;
        }
    }
    if(f==1){
        for(int i=1;i<=n;i++){
            if(str[i]=='?')str[i]='d';
        }
    }
    return f;
}
int main()
{
    int t;
    scanf("%d",&t);
    while(t--){
        long long l,r,m;
        scanf("%lld%lld%lld",&l,&r,&m);
        if(m==1){
            cout<<l<<" "<<l+1<<" "<<l<<endl;continue;
        }
        for(int a=l;a<=r;a++){
            if(m%a+l<=r){
                cout<<a<<" "<<m%a+l<<" "<<l<<endl;break;
            }
            if(a-(m%a)+l<=r){
                cout<<a<<" "<<l+(a-(m%a))<<" "<<l<<endl;break;
            }
        }
    }
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
int main() {
	ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int t;
    cin >> t;
    while (t--)
    {
        int m, l, r;
        cin >> l >> r >> m;
        int mod = m % l;
        int a, b, c;
        a = l;
        if ((m + mod) % a == 0)
        {
            c = r;
            b = r - mod;
        }
        else
        {
            c = r;
            b = r - mod;
        }
        cout << a << " " << b << " " << c << "\n";
    }
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
int main() {
	ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int t;
    cin >> t;
    while (t--)
    {
        int m, l, r;
        cin >> l >> r >> m;
        int mod = m % l;
        int a, b, c;
        a = l;
        for (int i = l; i <= r; i++)
        {
            a = i;
            if (i > m)
            {
                mod = i - m;
                b = r - mod;
                c = r;
                if (c >= l && c <= r && b >= l && b <= r)
                    break;
                continue;
            }
            mod = m % i;
            c = r - mod;
            b = r;
            if (c >= l && c <= r && b >= l && b <= r)
                break;
            mod = i - m % i;
            b = r - mod;
            c = r;
            if (c >= l && c <= r && b >= l && b <= r)
                break;
        }
        cout << a << " " << b << " " << c << "\n";
    }
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
int main() {
	ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int t;
    cin >> t;
    while (t--)
    {
        ll m, l, r;
        cin >> l >> r >> m;
        ll mod = m % l;
        ll a, b, c;
        for (int i = l; i <= r; i++)
        {
            a = i;
            if (i > m)
            {
                mod = i - m;
                b = r - mod;
                c = r;
                if (c >= l && c <= r && b >= l && b <= r)
                    break;
                continue;
            }
            mod = m % i;
            c = r - mod;
            b = r;
            if (c >= l && c <= r && b >= l && b <= r)
                break;
            mod = i - m % i;
            b = r - mod;
            c = r;
            if (c >= l && c <= r && b >= l && b <= r)
                break;
        }
        cout << a << " " << b << " " << c << "\n";
    }
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
int main() {
	ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int t;
    cin >> t;
    while (t--)
    {
        int m, l, r;
        cin >> l >> r >> m;
        int mod = m % l;
        int a, b, c;
        a = l;
        if ((m + mod) % a == 0)
        {
            c = r;
            b = r - mod;
        }
        else
        {
            b = r;
            c = r - mod;
        }
        cout << a << " " << b << " " << c << "\n";
    }
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
int main() {
	ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int t;
    cin >> t;
    while (t--)
    {
        int m, l, r;
        cin >> l >> r >> m;
        int mod = m % l;
        int a, b, c;
        a = l;
        for (int i = l; i <= r; i++)
        {
            mod = m % i;
            if ((m + mod) % a == 0)
            {
                c = r;
                b = r - mod;
            }
            else
            {
                b = r;
                c = r - mod;
            }
            if (c >= l && c <= r && b >= l && b <= r)
                break;
            mod = a - mod;
            if ((m - mod) % a == 0)
            {
                c = r;
                b = r - mod;
            }
            else
            {
                b = r;
                c = r - mod;
            }
            if (c >= l && c <= r && b >= l && b <= r)
                break;
        }
        cout << a << " " << b << " " << c << "\n";
    }
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
int main() {
	ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int t;
    cin >> t;
    while (t--)
    {
        int m, l, r;
        cin >> l >> r >> m;
        int mod = m % l;
        int a, b, c;
        a = l;
        if ((m + mod) % a == 0)
        {
            c = r - mod;
            b = r;
        }
        else
        {
            c = r;
            b = r - mod;
        }
        cout << a << " " << b << " " << c << "\n";
    }
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
int main() {
	ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int t;
    cin >> t;
    while (t--)
    {
        int m, l, r;
        cin >> l >> r >> m;
        int mod = m % l;
        cout << r << " " << r - mod << " " << l << "\n";
    }
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
int main() {
	ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int t;
    cin >> t;
    while (t--)
    {
        int m, l, r;
        cin >> l >> r >> m;
        int mod = m % l;
        int a, b, c;
        a = l;
        for (int i = l; i <= r; i++)
        {
            mod = m % i;
            if ((m + mod) % a == 0)
            {
                c = r;
                b = r - mod;
            }
            else
            {
                b = r;
                c = r - mod;
            }
            if (c >= l && c <= r && b >= l && b <= r)
                break;
        }
        cout << a << " " << b << " " << c << "\n";
    }
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
int main() {
	ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int t;
    cin >> t;
    while (t--)
    {
        int m, l, r;
        cin >> l >> r >> m;
        int mod = m % l;
        int a, b, c;
        a = l;
        for (int i = l; i <= r; i++)
        {
            if (m % i < mod)
            {
                a = i;
                mod = m % i;
            }
        }
        if ((m + mod) % a == 0)
        {
            c = r;
            b = r - mod;
        }
        else
        {
            b = r;
            c = r - mod;
        }
        cout << a << " " << b << " " << c << "\n";
    }
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        long l,r,m,a,b,c;
        cin>>l>>r>>m;

        for(long i=l; i<=r; i++)
        {
            long x=m%i;
            long res=m/i;
            long y=l,z=l+x;
            if(z<=r && (m+y-z))
            {
                a=i,b=z,c=y;
                break;

            }

            x=i-(m%i);
            y=l,z=l+x;
            if(z<=r && (m+z-y))
            {
                a=i,b=y,c=z;
                break;

            }
        }
        cout<<a<<" "<<b<<" "<<c<<endl;

    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        long l,r,m;
        cin>>l>>r>>m;
        /*if(l==1)
        {
            cout<<"1 1 1\n";
            continue;
        }*/
        for(long a=l; a<=r; a++)
        {
            long num=m%a;
            long res=m/a;
            if(num+l<=r && res!=0)
            {
                cout<<a<<" "<<num+l<<" "<<l<<endl;
                break;

            }
            res++;
            num=m-(res*a);
            if(r+num>=l)
            {

                cout<<a<<" "<<r+num<<" "<<r<<endl;
                break;

            }

        }

    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        long l,r,m;
        cin>>l>>r>>m;
        long mx=r-l;
        long mn=l-r;
        for(long a=l;a<=r;a++)
        {
            if((m%a)<=mx && m>=a)
            {
                long num=m%a;
                cout<<a<<" "<<num+l<<" "<<l<<endl;
                break;

            }
            else if(m%a-a>=mn)
            {
                long num=m%a-a;
                cout<<a<<" "<<r+num<<" "<<r<<endl;
                break;

            }

        }

    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        long l,r,m;
        cin>>l>>r>>m;
        long mx=r-l;
        long mn=l-r;
        for(long a=l;a<=r;a++)
        {
            long num=m%a;
            long res=m/a;
            if(num<=mx && res!=0)
            {
                cout<<a<<" "<<num+l<<" "<<l<<endl;
                break;

            }
            res++;
            num=m-(res*a);
            if(r+num>=l)
            {

                cout<<a<<" "<<r+num<<" "<<r<<endl;
                break;

            }

        }

    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        long l,r,m;
        cin>>l>>r>>m;
        long mx=r-l;
        long mn=l-r;
        for(long a=l;a<=r;a++)
        {
            long num=m%a;
            long res=m/a;
            if(num<=mx && res!=0)
            {
                cout<<a<<" "<<num+l<<" "<<l<<endl;
                break;

            }
            res++;
            num=m-(res*a);
            if(r+x>=l)
            {

                cout<<a<<" "<<r+num<<" "<<r<<endl;
                break;

            }

        }

    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        long l,r,m;
        cin>>l>>r>>m;
        if(l==1)
        {
            cout<<"1 1 1\n";
            continue;
        }
        for(long a=l; a<=r; a++)
        {
            long num=m%a;
            long res=m/a;
            if(num+l<=r && res!=0)
            {
                cout<<a<<" "<<num+l<<" "<<l<<endl;
                break;

            }
            res++;
            num=m-(res*a);
            if(r+num>=l)
            {

                cout<<a<<" "<<r+num<<" "<<r<<endl;
                break;

            }

        }

    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        long l,r,m;
        cin>>l>>r>>m;
        long mx=r-l;
        for(long a=l;a<=r;a++)
        {
            if(m>a && (m%a)<=mx)
            {
                long num=m%a;
                cout<<a<<" "<<num+a<<" "<<a<<endl;
                break;

            }
            if(m<a)
            {
                long num=m%a;
                cout<<a<<" "<<a<<" "<<a+1<<endl;
                break;

            }
            if(m==a)
            cout<<a<<" "<<a<<" "<<a<<endl;
                break;

        }

    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        long long l,r,m,b,c,a;
        cin>>l>>r>>m;
        for(long long i=l; i<=r; i++)
        {
            a=i;
            long long n=m/a;
            //cout<<n<<endl;
            long long d1=m-(n*a);
            //cout<<d1<<endl;
            long long d,d2=((n+1)*a)-m;
            //cout<<d2<<endl;
            if(n==0 || d2<d1 )
                d=-d2;
            else
                d=d1;
            //cout<<d<<endl;

            if(d>=0)
            {

                b=r;
                c=b-d;
            }
            else
            {

                b=l;
                c=b-d;
            }
            if((b>=l && b<=r) && (c>=l && c<=r))
                break;

        }
        cout<<a<<" "<<b<<" "<<c<<endl;
    }
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        long long l,r,m,b,c,a;
        cin>>l>>r>>m;
        for(long long i=l; i<=r; i++)
        {
            a=i;
            long long n=m/a;
            //cout<<n<<endl;
            long long d1=m-(n*a);
            //cout<<d1<<endl;
            long long d,d2=((n+1)*a)-m;
            //cout<<d2<<endl;
            if(n==0 )
                d=-d2;
            else
                d=d1;
            //cout<<d<<endl;

            if(d>=0)
            {

                b=r;
                c=b-d;
            }
            else
            {

                b=l;
                c=b-d;
            }
            if((b>=l && b<=r) && (c>=l && c<=r))
                break;

        }
        cout<<a<<" "<<b<<" "<<c<<endl;
    }
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        double l,r,m;
        cin>>l>>r>>m;
        int flag=0;
        for(double a=l;a<=r;a++)
        {
            for(double b=l;b<=r;b++)
            {
                for(double c=l;c<=r;c++)
                {
                  double n=(m+c-b)/a;
                  if(ceil(n)==n && n!=0)
                  {
                    cout<<a<<" "<<b<<" "<<c<<" "<<endl;
                    flag=1;
                    break;
                  }
                }
                if(flag==1)
                    break;
            }
            if(flag==1)
                    break;
        }

    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        long l,r,m;
        cin>>l>>r>>m;
        long mx=r-l;
        long mn=l-r;
        for(long a=l;a<=r;a++)
        {
            if(m>=a && (m%a)<=mx)
            {
                long num=m%a;
                cout<<a<<" "<<num+l<<" "<<l<<endl;
                break;

            }
            if(m%a-a>=mn)
            {
                long num=m%a-a;
                cout<<a<<" "<<r+num<<" "<<r<<endl;
                break;

            }

        }

    }
    return 0;
}


  /*  HARD WORK FOREVER PAYS  */
#include<bits/stdc++.h>
#define pb push_back
#define mk make_pair
#define f first
#define s second
#define turbo(){	\
	ios_base::sync_with_stdio(false); \
	cin.tie(NULL); \
}
using namespace std;
typedef long long ll;
typedef pair<int,int> PII;
int main()
{
	turbo();
	int t,i,j;
	cin>>t;
	while(t--){
		ll l,r,m,a,b,c,i,rest=0;
		cin>>l>>r>>m;
		for(i=l;i<=r;i++){
			rest=m%i;
			if((r-l)>=rest){
				if(m/i){
					cout<<i<<" "<<l+rest<<" "<<l<<"\n";
					break;
				}
				else{
					cout<<i<<" "<<l<<" "<<l+rest<<"\n";
					break;
				}
			}
		}
	}
	return 0;
}


  /*  HARD WORK FOREVER PAYS  */
#include<bits/stdc++.h>
#define pb push_back
#define mk make_pair
#define f first
#define s second
#define turbo(){	\
	ios_base::sync_with_stdio(false); \
	cin.tie(NULL); \
}
using namespace std;
typedef long long ll;
typedef pair<int,int> PII;
int main()
{
	turbo();
	int t,i,j;
	cin>>t;
	while(t--){
		ll l,r,m,a,b,c,i,rest=0;
		cin>>l>>r>>m;
		for(i=l;i<=r;i++){
			if(i>m){
				if(abs(l-r)>=abs(m-i)){
					cout<<i<<" "<<r+m-i<<" "<<r<<"\n";
					break;
				}
			}
			else{
				rest=m%i;
				if((r-l)>=rest){
					cout<<i<<" "<<l+rest<<" "<<l<<"\n";
					break;
				}
			}
		}
	}
	return 0;
}


  /*  HARD WORK FOREVER PAYS  */
#include<bits/stdc++.h>
#define pb push_back
#define mk make_pair
#define f first
#define s second
#define turbo(){	\
	ios_base::sync_with_stdio(false); \
	cin.tie(NULL); \
}
using namespace std;
typedef long long ll;
typedef pair<int,int> PII;
int main()
{
	turbo();
	int t,i,j;
	cin>>t;
	while(t--){
		ll l,r,m,a,b,c,i,rest=0;
		cin>>l>>r>>m;
		for(i=l;i<=r;i++){
			if(i>m){
				if(abs(l-r)>=abs(m-i)){
					cout<<i<<" "<<l<<" "<<l+abs(m-i)<<"\n";
				}
			}
			else{
				rest=m%i;
				if((r-l)>=rest){
					cout<<i<<" "<<l+rest<<" "<<l<<"\n";
					break;
				}
			}
		}
	}
	return 0;
}


  /*  HARD WORK FOREVER PAYS  */
#include<bits/stdc++.h>
#define pb push_back
#define mk make_pair
#define f first
#define s second
#define turbo(){	\
	ios_base::sync_with_stdio(false); \
	cin.tie(NULL); \
}
using namespace std;
typedef long long ll;
typedef pair<int,int> PII;
int main()
{
	turbo();
	int t,i,j;
	cin>>t;
	while(t--){
		ll l,r,m,a,b,c,i,rest=0;
		cin>>l>>r>>m;
		for(i=l;i<=r;i++){
			if(i>m){
				if(abs(l-r)>=abs(m-i)){
					cout<<i<<" "<<l<<" "<<l+abs(m-i)<<"\n";
					break;
				}
			}
			else{
				rest=m%i;
				if((r-l)>=rest){
					cout<<i<<" "<<l+rest<<" "<<l<<"\n";
					break;
				}
			}
		}
	}
	return 0;
}


  /*  HARD WORK FOREVER PAYS  */
#include<bits/stdc++.h>
#define pb push_back
#define mk make_pair
#define f first
#define s second
#define turbo(){	\
	ios_base::sync_with_stdio(false); \
	cin.tie(NULL); \
}
using namespace std;
typedef long long ll;
typedef pair<int,int> PII;
int main()
{
	turbo();
	int t,i,j;
	cin>>t;
	while(t--){
		ll l,r,m,a,b,c,i,rest=0;
		cin>>l>>r>>m;
		for(i=l;i<=r;i++){
			if(i>m){
				if(abs(l-r)>=abs(m-i)){
					cout<<i<<" "<<r+m-i<<" "<<r<<"\n";
					break;
				}
			}
			else{
				rest=m%i;
				if((r-l)>=rest){
					cout<<i<<" "<<r<<" "<<r-rest<<"\n";
					break;
				}
			}
		}
	}
	return 0;
}


  /*  HARD WORK FOREVER PAYS  */
#include<bits/stdc++.h>
#define pb push_back
#define mk make_pair
#define f first
#define s second
#define turbo(){	\
	ios_base::sync_with_stdio(false); \
	cin.tie(NULL); \
}
using namespace std;
typedef long long ll;
typedef pair<int,int> PII;
int main()
{
	turbo();
	int t,i,j;
	cin>>t;
	while(t--){
		ll l,r,m,j,a,b,c,i,rest=0,an=0;
		cin>>l>>r>>m;
		for(i=l;i<=r;i++){
			int tem=i;
				if(i>m){
					if(l+abs(m-i)<=r){
						cout<<tem<<" "<<l<<" "<<l+abs(m-i)<<"\n";
						an=1;
						break;
					}
				}
				else{
					rest=m%i;
					rest=m%i;
					if(l+rest<=r){
						cout<<tem<<" "<<l+rest<<" "<<l<<"\n";
						an=1;
						break;
					}
					else if(l+i-(m%i)<=r){
						cout<<tem<<" "<<l<<" "<<l+(i-(m%i))<<"\n";
						an=1;
						break;
					}
				}
		}
	}
	return 0;
}


  /*  HARD WORK FOREVER PAYS  */
#include<bits/stdc++.h>
#define pb push_back
#define mk make_pair
#define f first
#define s second
#define turbo(){	\
	ios_base::sync_with_stdio(false); \
	cin.tie(NULL); \
}
using namespace std;
typedef long long ll;
typedef pair<int,int> PII;
int main()
{
	turbo();
	int t,i,j;
	cin>>t;
	while(t--){
		ll l,r,m,j,a,b,c,i,rest=0;
		cin>>l>>r>>m;
		for(i=l;i<=r;i++){
			int tem=i;
			for(j=1;j<=2;j++){
				if(i>m){
					if(l+abs(m-i)<=r){
						cout<<tem<<" "<<l<<" "<<l+abs(m-i)<<"\n";
						break;
					}
				}
				else{
					rest=m%i;
					if(l+rest<=r){
						cout<<tem<<" "<<l+rest<<" "<<l<<"\n";
						break;
					}
				}
				i*=2;
			}
			i=tem;
		}
	}
	return 0;
}


  /*  HARD WORK FOREVER PAYS  */
#include<bits/stdc++.h>
#define pb push_back
#define mk make_pair
#define f first
#define s second
#define turbo(){	\
	ios_base::sync_with_stdio(false); \
	cin.tie(NULL); \
}
using namespace std;
typedef long long ll;
typedef pair<int,int> PII;
int main()
{
	turbo();
	int t,i,j;
	cin>>t;
	while(t--){
		ll l,r,m,j,a,b,c,i,rest=0,an=0;
		cin>>l>>r>>m;
		for(i=l;i<=r;i++){
			int tem=i;
			for(j=1;j<=2;j++){
				if(i>m){
					if(l+abs(m-i)<=r){
						cout<<tem<<" "<<l<<" "<<l+abs(m-i)<<"\n";
						an=1;
						break;
					}
				}
				else{
					rest=m%i;
					rest=m%i;
					if(l+rest<=r){
						cout<<tem<<" "<<l+rest<<" "<<l<<"\n";
						an=1;
						break;
					}
					else if(l+i-(m%i)<=r){
						cout<<tem<<" "<<l<<" "<<l+(i-(m%i))<<"\n";
						an=1;
						break;
					}
				}
				i*=2;
			}
			if(an) break;
			i=tem;
		}
	}
	return 0;
}


  /*  HARD WORK FOREVER PAYS  */
#include<bits/stdc++.h>
#define pb push_back
#define mk make_pair
#define f first
#define s second
#define turbo(){	\
	ios_base::sync_with_stdio(false); \
	cin.tie(NULL); \
}
using namespace std;
typedef long long ll;
typedef pair<int,int> PII;
int main()
{
	turbo();
	int t,i,j;
	cin>>t;
	while(t--){
		ll l,r,m,a,b,c,i,rest=0;
		cin>>l>>r>>m;
		for(i=l;i<=r;i++){
			if(i>m){
				if(l+abs(m-i)<=r){
					cout<<i<<" "<<l<<" "<<l+abs(m-i)<<"\n";
					break;
				}
			}
			else{
				rest=m%i;
				if(l+rest<=r){
					cout<<i<<" "<<l+rest<<" "<<l<<"\n";
					break;
				}
			}
		}
	}
	return 0;
}


  /*  HARD WORK FOREVER PAYS  */
#include<bits/stdc++.h>
#define pb push_back
#define mk make_pair
#define f first
#define s second
#define turbo(){	\
	ios_base::sync_with_stdio(false); \
	cin.tie(NULL); \
}
using namespace std;
typedef long long ll;
typedef pair<int,int> PII;
int main()
{
	turbo();
	int t,i,j;
	cin>>t;
	while(t--){
		ll l,r,m,a,b,c,i,rest=0;
		cin>>l>>r>>m;
		for(i=l;i<=r;i++){
			if(i>m){
				if(abs(l-r)>=abs(m-i)){
					cout<<i<<" "<<r+m-i<<" "<<r<<"\n";
					break;
				}
			}
			else{
				rest=m%i;
				if(l+rest<=r){
					cout<<i<<" "<<l+rest<<" "<<l<<"\n";
					break;
				}
			}
		}
	}
	return 0;
}


#include<iostream>
#include<bits/stdc++.h>
using namespace std;
int main()
{
    long long int t,i,j,k,l,r,m,a,b,c,mod,n;
    cin>>t;
    while(t--)
    {
        cin>>l>>r>>m;
        long long int diff = r-l;
        for(i=l;i<=r;i++)
        {
            mod = m%i;
            n = m/i;
            k = n * i;
            // cout<<n<<" "<<k<<" "<<m<<" "<<diff<<endl;
            if(n>0 && k>= m-diff && k<= m + diff)
            {
                // cout<<"OK"<<endl;
                a = i;
                if(diff > mod)
                {
                    b = r;
                    c = b - mod;
                    break;
                }
                else
                {
                    c = l;
                    b = l + mod;
                    break;
                }
            }
            else if(n==0)
            {
                n = 1;
                mod = m - i;
                a = i;
                c = r;
                b = r + mod;
                break;
            }
        }
        cout<<a<<" "<<b<<" "<<c<<endl;
    }
    return 0;
}


#include<iostream>
#include<bits/stdc++.h>
using namespace std;
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int t;
    cin>>t;
    long int l,r,m;
    long int n,a,b,c,i,j,d;
    while(t--)
    {
        cin>>l>>r>>m;
        d = r-l;
        int rrange = m + d;
        int lrange = ((m-d>0) ? m-d : 1);
        long int mid;
        // cout<<lrange<<"---"<<rrange<<endl;
        i= lrange;
        mid = (lrange+rrange)/2;
        n = floor(mid/l);
        a = l;
        if(n==0)
        {
            n=1;
        }
        // cout<<n<<" "<<a<<endl;
        j = m - (n*a);
        // cout<<j<<endl;
        if(j>=0)
        {
            b = r;
            c = r- j;
        }
        else
        {
            c = r;
            b = r+j;
        }
        //     a = floor((l+r)/2);
        //     n = floor(rrange/a);
        //     j = m-(n*a);
        //     b = r;
        //     c= r-j;
        // }
        cout<<a<<" "<<b<<" "<<c<<endl;

    }
    return 0;
}


#include<iostream>
#include<bits/stdc++.h>
using namespace std;
int main()
{
    long long int t,i,j,k,l,r,m,a,b,c;
    cin>>t;
    while(t--)
    {
        cin>>l>>r>>m;
        long long int diff = r - l;
        long long int mod = 0;
        a = l;
        mod = m%a;
        if(diff > mod)
        {
            a = l;
            b = r;
            c = b - mod;
        }
        else
        {
            a = l;
            diff = m - a;
            c = r;
            b = r + diff;
        }

        long long int n = floor(m/a);

        cout<<a<<" "<<b<<" "<<c<<endl;
    }
    return 0;
}


#include<iostream>
#include<bits/stdc++.h>
using namespace std;
int main()
{
    long long int t,i,j,k,l,r,m,a,b,c,mod,n;
    cin>>t;
    while(t--)
    {
        cin>>l>>r>>m;
        long long int diff = r-l;
        for(i=l;i<=r;i++)
        {
            n = (m + diff)/i;
            // n = m/i;
            k = n * i;
            // cout<<n<<" "<<k<<" "<<m<<" "<<diff<<endl;
            if(n>0 && k>= m-diff && k<= m + diff)
            {
                // cout<<"OK"<<endl;
                a = i;
                j = m- k;
                if(j > 0)
                {
                    c = l;
                    b = c + j ;
                    break;
                }
                else
                {
                    b = l;
                    c = b - j;
                    break;
                }
            }
            // else if(n==0)
            // {
            //     n = 1;
            //     mod = m - i;
            //     a = i;
            //     c = r;
            //     b = r + mod;
            //     break;
            // }
        }
        cout<<a<<" "<<b<<" "<<c<<endl;
    }
    return 0;
}


#include<iostream>
#include<bits/stdc++.h>
using namespace std;
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int t;
    cin>>t;
    long int l,r,m;
    long int n,a,b,c,i,j,d;
    while(t--)
    {
        cin>>l>>r>>m;
        d = r-l;
        int rrange = m + d;
        int lrange = ((m-d>0) ? m-d : 1);
        long int mid;
        // cout<<lrange<<"---"<<rrange<<endl;
        i= lrange;
        mid = (lrange+rrange)/2;
        n = floor(mid/l);
        a = (l+r)/2;
        if(n==0)
        {
            n=1;
        }
        // cout<<n<<" "<<a<<endl;
        j = m - (n*a);
        // cout<<j<<endl;
        if(j>=0)
        {
            b = r;
            c = r- j;
        }
        else
        {
            c = r;
            b = r+j;
        }
        //     a = floor((l+r)/2);
        //     n = floor(rrange/a);
        //     j = m-(n*a);
        //     b = r;
        //     c= r-j;
        // }
        cout<<a<<" "<<b<<" "<<c<<endl;

    }
    return 0;
}


#include<iostream>
#include<bits/stdc++.h>
using namespace std;
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int t;
    cin>>t;
    long int l,r,m;
    long int n,a,b,c,i,j,d;
    while(t--)
    {
        cin>>l>>r>>m;
        d = r-l;
        long int rem;
        a = l;
        while(a<=r)
        {
            rem=m%a;
            if(d>=(a-rem))
            {
                b= l;
                c= b + a - rem;
                break;
            }
            else if((m>a) && d>=rem)
            {
                c= l;
                b= c + rem;
                break;
            }
            a++;
        }
        cout<<a<<" "<<b<<" "<<c<<endl;

    }
    return 0;
}


#include<iostream>
#include<bits/stdc++.h>
using namespace std;
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int t;
    cin>>t;
    long int l,r,m;
    long int n,a,b,c,i,j,d;
    while(t--)
    {
        cin>>l>>r>>m;
        d = r-l;
        int rrange = m + d;
        int lrange = ((m-d>0) ? m-d : 1);
        long int mid;
        i= lrange;
        mid = (lrange+rrange)/2;
        n = floor(mid/l);
        a = l;
        j = m - (n*a);
        if(j>=0)
        {
            b = r;
            c = r- j;
        }
        else
        {
            a = floor((l+r)/2);
            n = floor(rrange/a);
            j = m-(n*a);
            b = r;
            c= r-j;
        }
        cout<<a<<" "<<b<<" "<<c<<endl;

    }
    return 0;
}


#include<iostream>
#include<bits/stdc++.h>
using namespace std;
int main()
{
    long long int t,i,j,k,l,r,m,a,b,c;
    cin>>t;
    while(t--)
    {
        cin>>l>>r>>m;
        long long int diff = r - l;
        long long int mod = 0;
        a = l;
        mod = m%a;
        if(diff > mod)
        {
            a = l;
            b = r;
            c = b - mod;
        }
        else
        {
            a++;
            diff = m - a;
            b = l;
            c = b - diff;
        }

        long long int n = floor(m/a);

        cout<<a<<" "<<b<<" "<<c<<endl;
    }
    return 0;
}


#include<iostream>
#include<bits/stdc++.h>
using namespace std;
int main()
{
    long int t,i,j,k,l,r,m,a,b,c;
    cin>>t;
    while(t--)
    {
        cin>>l>>r>>m;
        long int diff = r - l;
        long int mod = 0;
        a = l;
        long int n = floor(m/a);
        if(n==0)
        {
            a = l;
            diff = m - l;
            c  = r;
            b = diff + c;
        }
        else{
            a = l;
            diff = m%a;
            b = r;
            c = b - diff;
        }
        cout<<a<<" "<<b<<" "<<c<<endl;
    }
    return 0;
}


#define NguyenDangQuan the_author

#include <bits/stdc++.h>
#define all(x) x.begin(),x.end()
#define mset(x, i) memset(x,i,sizeof(x))
#define elif else if
#define heap priority_queue
#define fi first
#define se second
#define pb push_back
#define ld long double
#define ll long long
#define ull unsigned long long
using namespace std;

int typetest;

inline void fastIOfileinput(){
	ios_base:: sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	typetest = 1;
}

const int N = 2e5 + 2;
ll l, r, m;

void Enter(){
	cin >> l >> r >> m;
}

void solve(){
	if(m >= l && m <= r){
		cout << m << " " << l << " " << l << "\n";
		return;
	}
	if(m < l){
		cout << l << " " << l << " " << 2 * l - m << "\n";
		return;
	}
	for(ll a = l; a <= r; ++a){
			ll n = m / a;
			ll q = m % a;
			ll c = l;
			ll b = c + q;
			if(b >= l && b <= r){
				cout << a << " " << b << " " << c << "\n";
				return;
			}
	}
}

signed main(){
	fastIOfileinput();
	if(typetest){
		int t;
		cin >> t;
		while(t--){
			Enter();
			solve();
		}
	}
	else{
		Enter();
		solve();
	}
}


#define NguyenDangQuan the_author

#include <bits/stdc++.h>
#define all(x) x.begin(),x.end()
#define mset(x, i) memset(x,i,sizeof(x))
#define elif else if
#define heap priority_queue
#define fi first
#define se second
#define pb push_back
#define ld long double
#define ll long long
#define ull unsigned long long
using namespace std;

int typetest;

inline void fastIOfileinput(){
	ios_base:: sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	typetest = 1;
}

const int N = 2e5 + 2;
ll l, r, m;

void Enter(){
	cin >> l >> r >> m;
}

void solve(){
	if(m >= l && m <= r){
		cout << m << " " << l << " " << l << "\n";
		return;
	}
	if(m < l){
		cout << l << " " << l << " " << 2 * l - m << "\n";
		return;
	}
	for(ll a = l; a <= r; ++a){
		ll q = m % a;
		ll c = l;
		ll b = c + q;
		if(b >= l && b <= r){
			cout << a << " " << b << " " << c << "\n";
			return;
		}
		ll n = (m / a + 1);
		c = r;
		b = c + m - n * a;
		if(b >= l && b <= r){
			cout << a << " " << b << " " << c << "\n";
			return;
		}
	}
}

signed main(){
	fastIOfileinput();
	if(typetest){
		int t;
		cin >> t;
		while(t--){
			Enter();
			solve();
		}
	}
	else{
		Enter();
		solve();
	}
}


#define NguyenDangQuan the_author

#include <bits/stdc++.h>
#define all(x) x.begin(),x.end()
#define mset(x, i) memset(x,i,sizeof(x))
#define elif else if
#define heap priority_queue
#define fi first
#define se second
#define pb push_back
#define ld long double
#define ll long long
#define ull unsigned long long
using namespace std;

int typetest;

inline void fastIOfileinput(){
	ios_base:: sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	typetest = 1;
}

const int N = 2e5 + 2;
ll l, r, m;

void Enter(){
	cin >> l >> r >> m;
}

void solve(){
	if(m >= l && m <= r){
		cout << m << " " << l << " " << l << "\n";
		return;
	}
	for(ll a = l; a <= r; ++a){
		if(m >= a){
			ll n = m / a;
			ll q = m % a;
			ll c = l;
			ll b = c + q;
			if(b >= l && b <= r){
				cout << a << " " << b << " " << c << "\n";
				return;
			}
		}
		else{
			cout << l << " " << l << " " << (m / l + 1) * l - m + l << "\n";
			return;
		}
	}
}

signed main(){
	fastIOfileinput();
	if(typetest){
		int t;
		cin >> t;
		while(t--){
			Enter();
			solve();
		}
	}
	else{
		Enter();
		solve();
	}
}


#define NguyenDangQuan the_author

#include <bits/stdc++.h>
#define all(x) x.begin(),x.end()
#define mset(x, i) memset(x,i,sizeof(x))
#define elif else if
#define heap priority_queue
#define fi first
#define se second
#define pb push_back
#define ld long double
#define ll long long
#define ull unsigned long long
using namespace std;

int typetest;

inline void fastIOfileinput(){
	ios_base:: sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	typetest = 1;
}

const int N = 2e5 + 2;
ll l, r, m;

void Enter(){
	cin >> l >> r >> m;
}

void solve(){
	ll n = (m + r) / l - 1;
	if(n < (m + l) / r - 1)
		++n;
	//cout << n << "\n";
	cout << m / n << " " << l << " " << l + m - m / n * n << "\n";
}

signed main(){
	fastIOfileinput();
	if(typetest){
		int t;
		cin >> t;
		while(t--){
			Enter();
			solve();
		}
	}
	else{
		Enter();
		solve();
	}
}