Pasha loves to send strictly positive integers to his friends. Pasha cares about security, therefore when he wants to send an integer $n$, he encrypts it in the following way: he picks three integers $a$, $b$ and $c$ such that $l \leq a,b,c \leq r$, and then he computes the encrypted value $m = n \cdot a + b - c$.

Unfortunately, an adversary intercepted the values $l$, $r$ and $m$. Is it possible to recover the original values of $a$, $b$ and $c$ from this information? More formally, you are asked to find any values of $a$, $b$ and $c$ such that

$a$, $b$ and $c$ are integers,

$l \leq a, b, c \leq r$,

there exists a strictly positive integer $n$, such that $n \cdot a + b - c = m$.


-----Input-----

The first line contains the only integer $t$ ($1 \leq t \leq 20$) — the number of test cases. The following $t$ lines describe one test case each.

Each test case consists of three integers $l$, $r$ and $m$ ($1 \leq l \leq r \leq 500000$, $1 \leq m \leq 10^{10}$). The numbers are such that the answer to the problem exists.


-----Output-----

For each test case output three integers $a$, $b$ and $c$ such that, $l \leq a, b, c \leq r$ and there exists a strictly positive integer $n$ such that $n \cdot a + b - c = m$. It is guaranteed that there is at least one possible solution, and you can output any possible combination if there are multiple solutions.


-----Examples-----

Input
2
4 6 13
2 3 1
Output
4 6 5
2 2 3


-----Note-----

In the first example $n = 3$ is possible, then $n \cdot 4 + 6 - 5 = 13 = m$. Other possible solutions include: $a = 4$, $b = 5$, $c = 4$ (when $n = 3$); $a = 5$, $b = 4$, $c = 6$ (when $n = 3$); $a = 6$, $b = 6$, $c = 5$ (when $n = 2$); $a = 6$, $b = 5$, $c = 4$ (when $n = 2$).

In the second example the only possible case is $n = 1$: in this case $n \cdot 2 + 2 - 3 = 1 = m$. Note that, $n = 0$ is not possible, since in that case $n$ is not a strictly positive integer.

Difficulty: MEDIUM
Tags: Number theory

Sorting

Mathematics

Complete search
Skill types: Sorting

Complete search

Starter code:

Solutions:
import bisect as bi, sys
import math as mt
import collections as cc
I = lambda : list(map(int, input().split()))
for tc in range(int(input())):
	(l, r, m) = I()
	(a, b, c) = [0, 0, 0]
	for i in range(l, r + 1):
		if i <= m:
			xx = i
			te = m % i
			tem = m // xx * xx + xx - m
			(yy, zz) = (l, l + tem)
			if min(xx, yy, zz) >= l and max(xx, yy, zz) <= r:
				(a, b, c) = (xx, yy, zz)
				break
			(yy, zz) = (l + te, l)
			if min(xx, yy, zz) >= l and max(zz, yy, zz) <= r:
				(a, b, c) = (xx, yy, zz)
				break
		else:
			xx = i
			tem = i - m
			(yy, zz) = (l, l + tem)
			if min(xx, yy, zz) >= l and max(xx, yy, zz) <= r:
				(a, b, c) = (xx, yy, zz)
				break
	print(a, b, c)


for i in range(int(input())):
	(l, r, m) = list(map(int, input().split()))
	fl = True
	a = l
	while fl:
		ost = m % a
		b = l
		if ost == 0:
			c = l
		else:
			c = l + (a - ost)
		if c <= r:
			fl = False
			print(a, b, c)
		elif m >= a:
			c = l
			b = l + ost
			if b <= r:
				fl = False
				print(a, b, c)
		else:
			c = l + a
			b = l + ost
			if b <= r and c <= r:
				fl = False
				print(a, b, c)
		if fl:
			a = a + 1


t = int(input())
for _ in range(t):
	(l, r, m) = list(map(int, input().split()))
	for i in range(l, r + 1):
		rem = m % i
		q = m // i
		sub = rem
		add = i - rem
		if add <= r - l:
			print(i, l, add + l)
			break
		if q >= 1 and sub <= r - l:
			print(i, sub + l, l)
			break


import math
t = int(input())
for i in range(t):
	(l, r, z) = [int(l) for l in input().split()]
	a1 = z - (r - l)
	a2 = z + (r - l)
	a = 0
	l1 = 2 * (r - l)
	p = 0
	q1 = [1] * 100
	(tec, mac) = (0, 0)
	for j in range(l, r + 1, 1):
		m = a2 % j
		if m == 0:
			(a, p) = (j, a2)
			break
		elif m <= l1:
			(a, p) = (j, a2 - m)
			break
	q = z - p
	if q >= 0:
		(b, c) = (r, r - q)
	if q < 0:
		(b, c) = (l, l - q)
	print(a, b, c)


from sys import stdin

def re():
	return stdin.readline().strip()

def r_t(tp):
	return map(tp, re().strip().split())

def r_l(tp):
	return list(r_t(tp))

def solve(l, r, m):
	for a in range(l, r + 1):
		x = m % a
		if m - x != 0:
			b = l + x
			c = l
			if l <= b <= r and l <= c <= r:
				return [a, b, c]
		if m + (a - x) != 0:
			x = a - x
			b = l
			c = l + x
			if l <= b <= r and l <= c <= r:
				return [a, b, c]

def main():
	cs = int(re())
	for _ in range(cs):
		(l, r, m) = r_t(int)
		print(*solve(l, r, m))
main()


for _ in range(int(input())):
	(l, r, m) = map(int, input().split())
	arr = []
	arr2 = []
	(a, b, c, a2, b2, c2) = (0, 0, 0, 0, 0, 0)
	for i in range(l, r + 1):
		arr.append(m % i)
		arr2.append(i - m % i)
	for i in range(r - l + 1):
		if arr[i] <= r - l:
			a = i + l
			b = r
			c = r - arr[i]
			if (m - b + c) // a == 0:
				continue
			break
	for i in range(r - l + 1):
		if arr2[i] <= r - l:
			a2 = i + l
			c2 = r
			b2 = r - arr2[i]
			if (m - b2 + c2) // a2 == 0:
				continue
			break
	if a != 0 and (m - b + c) // a != 0:
		print(a, b, c)
	else:
		print(a2, b2, c2)


n = int(input())
for i in range(n):
	(l, r, m) = map(int, input().split())
	d = r - l
	for j in range(l, r + 1):
		v = m % j
		if v <= d and m >= j:
			print(j, r, r - v)
			break
		elif v >= j - d:
			print(j, l, l + j - v)
			break


t = int(input())
(l, r, m) = ([], [], [])
for i in range(t):
	lrm = input().split()
	l.append(int(lrm[0]))
	r.append(int(lrm[1]))
	m.append(int(lrm[2]))
for i in range(t):
	left = m[i] + l[i] - r[i]
	right = m[i] + r[i] - l[i]
	for a in range(l[i], r[i] + 1):
		n = right // a
		if left <= a * n <= right:
			break
	if a * n < m[i]:
		print(a, r[i], r[i] + a * n - m[i], end=' ')
	else:
		print(a, r[i] + m[i] - a * n, r[i], end=' ')


for _ in range(int(input())):
	(l, r, m) = map(int, input().split())
	if l == r:
		print(l, l, l)
	else:
		for i in range(l, r + 1):
			z = m % i
			if m >= i and r - l >= z and (z != 0):
				print(i, r, r - z)
				break
			if m >= i and i - z <= r - l and (z != 0):
				print(i, r - (i - z), r)
				break
			elif m <= i:
				if i - m <= r - l and z != 0:
					print(i, r - (i - m), r)
					break
				if m <= r - l and z != 0:
					print(i, r - m, r)
					break
			elif z == 0:
				print(i, l, l)
				break


import sys
input = sys.stdin.readline
t = int(input())
for tests in range(t):
	(l, r, m) = map(int, input().split())
	MIN = 1 << 31
	for i in range(l, r + 1):
		if m // i > 0 and m % i < MIN:
			MIN = m % i
			a = i
	for i in range(l, r + 1):
		if i <= 0:
			continue
		x = m // i + 1
		if l <= i <= r:
			if x * i - m < MIN:
				MIN = m - x * i
				a = i
	if MIN >= 0:
		print(a, l + MIN, l)
	else:
		print(a, r + MIN, r)


t = int(input())
ls = []
for i in range(t):
	ls.append([int(j) for j in input().split()])
for i in range(t):
	[l, r, m] = ls[i]
	Min = m - (r - l)
	Max = m + (r - l)
	an = 0
	if Min >= 1:
		for a in range(l, r + 1):
			if Max - Min >= a or Min % a > Max % a or Min % a == 0:
				if Min % a:
					an = Min + a - Min % a
				else:
					an = Min
				if an > Max:
					continue
				else:
					break
		m -= an
		for b in range(l, r + 1):
			if l <= b - m and b - m <= r:
				break
		print(a, b, b - m)
	else:
		for a in range(l, r + 1):
			if Max - Min >= a or Min % a > Max % a or Min % a == 0:
				if Min % a:
					an = Min + a - Min % a
				else:
					an = Min
				while an <= 0:
					an += a
				if an > Max:
					continue
				else:
					break
		m -= an
		for b in range(l, r + 1):
			if l <= b - m and b - m <= r:
				break
		print(a, b, b - m)


tests = int(input())
for test in range(tests):
	(l, r, m) = list(map(int, input().split()))
	bound = r - l
	res = None
	for i in range(l, r + 1, 1):
		remain = m % i
		if remain <= bound and m // i > 0:
			res = [i, r, r - remain]
			break
		elif i - remain <= bound:
			res = [i, l, l + (i - remain)]
			break
	if res:
		print(' '.join(list(map(str, res))))


def main():
	(l, r, m) = map(int, input().split())
	for a in range(l, r + 1):
		res = m % a
		if res <= r - l and m >= a:
			b = res + l
			c = l
			print(a, b, c)
			return
		if res - a >= l - r:
			b = l
			c = a - res + l
			print(a, b, c)
			return
tests = int(input())
for _ in range(tests):
	main()


t = int(input())
for _ in range(t):
	(l, r, m) = map(int, input().split())
	done = 0
	for a in range(l, r + 1):
		if m - a < l - r:
			continue
		s = m % a
		if s <= r - l or s - a >= l - r:
			print(a)
			if s - a >= l - r:
				print(l)
				print(l - s + a)
			else:
				print(r)
				print(r - s)
			break


t = int(input())
for _ in range(t):
	(l, r, m) = [int(x) for x in input().split()]
	d = r - l
	for a in range(l, r + 1):
		n = (m - d) // a
		if (m - d) % a != 0:
			n += 1
		if n < 1:
			n = 1
		if m - d <= n * a <= m + d:
			break
	X = m - n * a
	if X >= 0:
		c = l
		b = l + X
	else:
		b = l
		c = l - X
	print(a, b, c)


t = int(input())
for T in range(0, t):
	(l, r, sum) = map(int, input().split())
	deff = r - l
	more = True
	if sum >= l:
		for i in range(r, l - 1, -1):
			if sum % i <= deff:
				a = i
				need = sum % i
				more = False
				break
			elif i - sum % i <= deff:
				a = i
				need = i - sum % i
				break
		if not more:
			print(a, l + need, l)
		else:
			print(a, l, l + need)
	else:
		need = l - sum
		print(l, l, l + need)


from math import *
from collections import *
from bisect import *
import sys
input = sys.stdin.readline
t = int(input())
ref = 'abacaba'
ref1 = ref
ref = list(ref)
while t:
	t -= 1
	(l, r, m) = map(int, input().split())
	for i in range(l, r + 1):
		v = m % i
		v1 = ceil(m / i)
		v1 = m - v1 * i
		if v >= 0 and v <= r - l and (m // i != 0):
			print(i, r, r - v)
			break
		elif v1 <= 0 and v1 >= l - r:
			print(i, r + v1, r)
			break


import sys
inp = sys.stdin.readline

def linp(x):
	return list(map(int, x.split()))

def minp(x):
	return map(int, x.split())

def main():
	for _ in range(int(inp())):
		(l, r, m) = minp(inp())
		ma = r - l
		for i in range(l, r + 1):
			mm = m % i
			if m >= i and mm <= ma:
				print(i, l + mm, l)
				break
			if i - mm <= ma:
				print(i, l, l + i - mm)
				break
main()


for i in range(int(input())):
	(l, r, m) = map(int, input().split())
	for i in range(l, r + 1):
		op1 = i - m % i
		op2 = m % i
		if l + op1 <= r:
			print(i, l, l + op1)
			break
		if l + op2 <= r:
			print(i, l + op2, l)
			break


for t in range(int(input())):
	(l, r, m) = map(int, input().split())
	diff = r - l
	a = 0
	b = 0
	c = 0
	for i in range(l, r + 1):
		x1 = m % i
		x2 = i - x1
		if x1 <= diff and m - x1 > 0:
			a = i
			b = l + x1
			c = l
			break
		elif x2 <= diff:
			a = i
			b = l
			c = l + x2
			break
	print(a, b, c)


import sys
input = sys.stdin.readline
read = lambda : map(int, input().split())
read_float = lambda : map(float, input().split())

def ceil(x):
	if x != int(x):
		x = int(x) + 1
	return x

def factorial(x, m):
	val = 1
	while x > 0:
		val = val * x % m
		x -= 1
	return val

def fact(x):
	val = 1
	while x > 0:
		val *= x
		x -= 1
	return val

def swaparr(arr, a, b):
	temp = arr[a]
	arr[a] = arr[b]
	arr[b] = temp

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

def lcm(a, b):
	return a * b // math.gcd(a, b)

def nCr(n, k):
	if k > n:
		return 0
	if k > n - k:
		k = n - k
	res = 1
	for i in range(k):
		res = res * (n - i)
		res = res / (i + 1)
	return int(res)

def primefs(n):
	primes = {}
	while n % 2 == 0 and n > 0:
		primes[2] = primes.get(2, 0) + 1
		n = n // 2
	for i in range(3, int(n ** 0.5) + 2, 2):
		while n % i == 0 and n > 0:
			primes[i] = primes.get(i, 0) + 1
			n = n // i
	if n > 2:
		primes[n] = primes.get(n, 0) + 1
	return primes

def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def swap(a, b):
	temp = a
	a = b
	b = temp
	return (a, b)

def find(x, link):
	p = x
	while p != link[p]:
		p = link[p]
	while x != p:
		nex = link[x]
		link[x] = p
		x = nex
	return p

def union(x, y, link, size):
	x = find(x, link)
	y = find(y, link)
	if size[x] < size[y]:
		(x, y) = swap(x, y)
	if x != y:
		size[x] += size[y]
		link[y] = x

def sieve(n):
	prime = [True for i in range(n + 1)]
	(prime[0], prime[1]) = (False, False)
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime

def phi(n):
	result = n
	p = 2
	while p * p <= n:
		if n % p == 0:
			while n % p == 0:
				n = n // p
			result = result * (1.0 - 1.0 / float(p))
		p = p + 1
	if n > 1:
		result = result * (1.0 - 1.0 / float(n))
	return int(result)

def is_prime(n):
	if n == 0:
		return False
	if n == 1:
		return True
	for i in range(2, int(n ** (1 / 2)) + 1):
		if not n % i:
			return False
	return True
MAXN = int(100000.0 + 5)

def spf_sieve():
	spf[1] = 1
	for i in range(2, MAXN):
		spf[i] = i
	for i in range(4, MAXN, 2):
		spf[i] = 2
	for i in range(3, ceil(MAXN ** 0.5), 2):
		if spf[i] == i:
			for j in range(i * i, MAXN, i):
				if spf[j] == j:
					spf[j] = i
spf = [0 for i in range(MAXN)]

def factoriazation(x):
	res = []
	for i in range(2, int(x ** 0.5) + 1):
		while x % i == 0:
			res.append(i)
			x //= i
	if x != 1:
		res.append(x)
	return res

def factors(n):
	res = []
	for i in range(1, int(n ** 0.5) + 1):
		if n % i == 0:
			res.append(i)
			res.append(n // i)
	return list(set(res))

def int_array():
	return list(map(int, input().strip().split()))

def float_array():
	return list(map(float, input().strip().split()))

def str_array():
	return input().strip().split()

def binary_search(low, high, w, h, n):
	while low < high:
		mid = low + (high - low) // 2
		if check(mid, w, h, n):
			low = mid + 1
		else:
			high = mid
	return low

def check(councils, a, k):
	summ = 0
	for x in a:
		summ += min(x, councils)
	return summ // councils >= k
MOD = int(1000000000.0) + 7
CMOD = 998244353
INF = float('inf')
NINF = -float('inf')
from itertools import permutations
import math
import bisect as bis
import random
import sys

def contains(s):
	s = list(s)
	c = 0
	for i in range(len(s) - 6):
		if ''.join(s[i:i + 7]) == 'abacaba':
			c += 1
	return c

def process(s):
	ans = ''
	for x in s:
		if x == '?':
			ans = ans + 'd'
		else:
			ans = ans + x
	return ans

def solve():
	(l, r, m) = read()
	b_minus_c = m % l
	diff = r - l
	for i in range(l, r + 1):
		m1 = m % i
		m2 = i - m1
		if i <= m and m1 <= diff:
			a = i
			b = r
			c = r - m1
			break
		elif m2 <= diff:
			a = i
			b = r - m2
			c = r
			break
	print(a, b, c)
for _ in range(int(input())):
	solve()


for _ in range(int(input())):
	(l, r, m) = map(int, input().split())
	for a in range(l, r + 1):
		rem1 = m % a
		rem2 = a - rem1
		if rem1 <= r - l and m // a:
			b = rem1 + l
			c = l
			print(a, b, c)
			break
		elif rem2 <= r - l:
			b = l
			c = l + rem2
			print(a, b, c)
			break


for _ in range(int(input())):
	(l, r, m) = map(int, input().split())
	if m < l:
		a = l
		b = l
		for i in range(l, r + 1):
			if m == 2 * l - i:
				print(a, b, i)
				break
	else:
		for i in range(l, r + 1):
			rem1 = m % i
			rem2 = i - m % i
			if rem1 <= r - l:
				print(i, l + rem1, l)
				break
			if rem2 <= r - l:
				print(i, r - rem2, r)
				break


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	(l, r, m) = map(int, input().split())
	low = l - r
	high = r - l
	for a in range(l, r + 1):
		lo = 1
		hi = (m + high) // a + 2
		while lo < hi:
			mi = (lo + hi) // 2
			diff = m - mi * a
			if low <= diff <= high:
				if diff < 0:
					print(a, l, l - diff)
				else:
					print(a, r, r - diff)
				break
			elif diff < low:
				hi = mi
			else:
				lo = mi + 1
		else:
			continue
		break


t = int(input())
for _ in range(t):
	(l, r, m) = map(int, input().split())
	(lb, ub) = (max(m + l - r, 1), m + r - l)
	for a in range(l, r + 1):
		(min_n, max_n) = (lb // a, ub // a)
		if max_n > min_n or lb % a == 0:
			na = max_n * a
			if na < m:
				print(a, l + m - na, l)
			else:
				print(a, l, na + l - m)
			break


from os import path
import sys
from heapq import heappush, heappop
from functools import cmp_to_key as ctk
from collections import deque, defaultdict as dd
from bisect import bisect, bisect_left, bisect_right, insort, insort_left, insort_right
from itertools import permutations
from datetime import datetime
from math import ceil, sqrt, log, gcd

def ii():
	return int(input())

def si():
	return input().rstrip()

def mi():
	return map(int, input().split())

def li():
	return list(mi())
abc = 'abcdefghijklmnopqrstuvwxyz'
mod = 1000000007
inf = float('inf')
vow = ['a', 'e', 'i', 'o', 'u']
(dx, dy) = ([-1, 1, 0, 0], [0, 0, 1, -1])

def bo(i):
	return ord(i) - ord('a')
file = 1

def solve():
	for _ in range(ii()):
		(l, r, m) = mi()
		x = r - l
		for i in range(l, r + 1):
			a = i
			if m + x >= a:
				p1 = m // a * a
				p2 = (m // a + 1) * a
				x1 = m - p1
				x2 = p2 - m
				if x1 <= x and p1 > 0:
					print(a, r, r - x1)
					break
				if x2 <= x:
					print(a, r - x2, r)
					break
if file:
	if path.exists('input.txt'):
		sys.stdin = open('input.txt', 'r')
		sys.stdout = open('output.txt', 'w')
	else:
		input = sys.stdin.readline
solve()


for u in range(int(input())):
	(l, r, m) = map(int, input().split())
	x = r - l
	f = 0
	p = []
	for i in range(l, r + 1):
		if m % i == 0:
			f = 1
			p = [i, i, i]
			break
		else:
			b = m % i
			d = i - m % i
			if d <= x:
				p = [i, l, l + d]
				f = 1
				break
			elif b <= x and m - b != 0:
				p = [i, l + b, l]
				f = 1
				break
	print(*p)


import sys
import math
from collections import defaultdict, Counter
t = int(input())
for i in range(t):
	(l, r, m) = map(int, input().split())
	for j in range(l, r + 1):
		d = m % j
		if j - d <= r - l:
			print(j, l, l + j - d)
			break
		elif d <= r - l and m >= j:
			print(j, l + d, l)
			break


cases = int(input())
for i in range(cases):
	l1 = input().split(' ')
	l = int(l1[0])
	r = int(l1[1])
	m = int(l1[2])
	import math
	arr = []
	rem = []
	for j in range(l, r + 1):
		n = math.floor((m + r - l) / j)
		if n > 0:
			remain = m - j * n
			arr.append(j)
			rem.append(remain)
	for (y, z) in zip(arr, rem):
		low = l - r
		up = r - l
		if z >= low and z <= up:
			if z == 0:
				b = l
				c = l
			elif z > 0:
				b = l + z
				c = l
			else:
				b = r + z
				c = r
			print(y, b, c)
			break


for _ in range(int(input())):
	(l, r, m) = map(int, input().split())
	(highest, lowest) = (m + r - l, m + l - r)
	for i in range(l, r + 1):
		k = highest // i * i
		if k >= lowest:
			if k <= m:
				print(i, r, r - (m - k))
			else:
				print(i, r + (m - k), r)
			break


import collections
import sys

def get_ints():
	return map(int, sys.stdin.readline().split())
for _ in range(int(input())):
	listt = list(get_ints())
	(l, r, m) = (listt[0], listt[1], listt[2])
	for i in range(l, r + 1):
		x1 = m % i
		x2 = i - m % i
		if i <= m and x1 <= r - l:
			a = i
			b = r
			c = r - x1
			i = r + 2
			break
		elif x2 <= r - l:
			a = i
			b = r - x2
			c = r
			i = r + 2
			break
	print(a, end=' ')
	print(b, end=' ')
	print(c)


import math
for _ in range(int(input())):
	(l, r, m) = map(int, input().split())
	r1 = r
	r2 = r
	for i in range(l, r + 1):
		if m % i < r1:
			r1 = m % i
			x = i
		if -m % i < r2:
			r2 = -m % i
			y = i
	if r1 < r2:
		rem = r1
		a = x
	else:
		rem = r2
		a = y
	if rem == 0:
		(b, c) = (l, l)
	elif m < l:
		a = l
		rem = l - m
		c = l + 1
		b = l
		while c < r:
			if c - b == rem:
				break
			else:
				c = c + 1
	elif (m + rem) % a == 0:
		c = l + 1
		b = l
		while c < r:
			if c - b == rem:
				break
			else:
				c = c + 1
	elif (m - rem) % a == 0:
		c = l
		b = l + 1
		while b < r:
			if b - c == rem:
				break
			else:
				b = b + 1
	print(a, b, c)


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	(l, r, m) = map(int, input().split())
	for i in range(l, r + 1):
		if m % i <= r - l and i <= m:
			c = l
			b = c + m % i
			a = i
			break
		if i - m % i <= r - l:
			b = l
			c = b + i - m % i
			a = i
			break
	print(a, b, c)


import sys
from collections import defaultdict as dd
from collections import deque
from fractions import Fraction as f
from copy import *
from bisect import *
from heapq import *
from math import *
from itertools import permutations

def eprint(*args):
	print(*args, file=sys.stderr)
zz = 1
if zz:
	input = sys.stdin.readline
else:
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('all.txt', 'w')

def li():
	return [int(xx) for xx in input().split()]

def fli():
	return [float(x) for x in input().split()]

def comp(a, b):
	if a > b:
		return 2
	return 2 if a == b else 0

def gi():
	return [xx for x in input().split()]

def fi():
	return int(input())

def swap(a, i, j):
	(a[i], a[j]) = (a[j], a[i])

def si():
	return list(input().rstrip())

def mi():
	return map(int, input().split())

def gh():
	sys.stdout.flush()

def graph(n, m):
	for i in range(m):
		(x, y) = mi()
		a[x].append(y)
		a[y].append(x)

def bo(i):
	return ord(i) - ord('a')
t = fi()
while t > 0:
	t -= 1
	(l, r, m) = mi()
	for i in range(l, r + 1):
		if m % i == 0:
			ans = [i, i, i]
			break
		else:
			if l + (i - m % i) <= r:
				ans = [i, l, l + (i - m % i)]
				break
			if r - m % i >= l:
				ans = [i, r, r - m % i]
				break
	print(*ans)


t = int(input())
input_list = []
for _ in range(t):
	input_sample = tuple(map(int, input().split()))
	input_list.append(input_sample)

def get_reuslt(i):
	(l, r, m) = (i[0], i[1], i[2])
	d = r - l
	for a in range(l, r + 1):
		v = m % a
		if v <= d and m >= a:
			return (a, l + v, l)
		elif v >= a - d:
			return (a, l, l + a - v)
for i in input_list:
	res = get_reuslt(i)
	print(res[0], res[1], res[2])


t = int(input())
for _ in range(t):
	(l, r, m) = list(map(int, input().split()))
	for i in range(l, r + 1):
		mod = m % i
		if mod == m:
			print(i, r - (i - m), r)
			break
		if r - mod >= l:
			print(i, r, r - mod)
			break
		mod = mod - i
		if r + mod >= l:
			print(i, r + mod, r)
			break


def main():
	for i in range(int(input())):
		(l, r, m) = map(int, input().split())
		tmp = r - l
		if l == r:
			print(l, l, l)
		else:
			for j in range(l, r + 1):
				if m // j == 0:
					ll = j - m
					if ll <= tmp:
						if j - ll == m:
							print(j, l, l + ll)
							break
						else:
							continue
				else:
					ttmp = m // j
					t = m - j * (m // j)
					if t <= tmp:
						if j * (m // j) + t == m:
							print(j, l + t, l)
							break
					ll = (ttmp + 1) * j - m
					if ll <= tmp:
						print(j, l, l + ll)
						break
main()


import os, io
from sys import stdout
import collections
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
import sys

def primes(n):
	sieve = [True] * n
	for i in range(3, int(n ** 0.5) + 1, 2):
		if sieve[i]:
			sieve[i * i::2 * i] = [False] * ((n - i * i - 1) // (2 * i) + 1)
	return [2] + [i for i in range(3, n, 2) if sieve[i]]

def binomial_coefficient(n, k):
	if 0 <= k <= n:
		ntok = 1
		ktok = 1
		for t in range(1, min(k, n - k) + 1):
			ntok *= n
			ktok *= t
			n -= 1
		return ntok // ktok
	else:
		return 0

def powerOfK(k, max):
	if k == 1:
		return [1]
	if k == -1:
		return [-1, 1]
	result = []
	n = 1
	while n <= max:
		result.append(n)
		n *= k
	return result

def divisors(n):
	i = 1
	result = []
	while i * i <= n:
		if n % i == 0:
			if n / i == i:
				result.append(i)
			else:
				result.append(i)
				result.append(n / i)
		i += 1
	return result

def distance(xa, ya, xb, yb):
	return ((ya - yb) ** 2 + (xa - xb) ** 2) ** 0.5

def digitsSum(n):
	if n == 0:
		return 0
	r = 0
	while n > 0:
		r += n % 10
		n //= 10
	return r

def isValid(i, j, n, m):
	return i >= 0 and i < n and (j >= 0) and (j < m)

def print_grid(grid):
	for line in grid:
		print(' '.join(map(str, line)))

def kadane(a, size):
	max_so_far = 0
	max_ending_here = 0
	for i in range(0, size):
		max_ending_here = max_ending_here + a[i]
		if max_so_far < max_ending_here:
			max_so_far = max_ending_here
		if max_ending_here < 0:
			max_ending_here = 0
	return max_so_far

def prefixSum(arr):
	for i in range(1, len(arr)):
		arr[i] = arr[i] + arr[i - 1]
	return arr

def ceil(n, d):
	if n % d == 0:
		return n // d
	else:
		return n // d + 1

def _abs(a, b):
	return int(abs(a - b))

def evenodd(l):
	even = [e for e in l if e & 1 == 0]
	odd = [e for e in l if e & 1]
	return (even, odd)
for _ in range(int(input())):
	(l, r, m) = list(map(int, input().split()))
	minf = m - (r - l)
	msup = m + (r - l)
	while minf <= 0 and minf < msup:
		minf += 1
	found = False
	for i in range(l, r + 1):
		res = ceil(minf, i)
		if res <= 0:
			continue
		na = i * res
		if na <= msup:
			if na == m:
				print(i, l, l)
			elif na > m:
				print(i, l, l + (na - m))
			else:
				print(i, l + (m - na), l)
			found = True
		if found:
			break


def main():
	for _ in range(int(input())):
		(l, r, m) = map(int, input().split())
		d = r - l
		for a in range(l, r + 1):
			x = m % a
			if d >= x and m - x > 0:
				print(*[a, l + x, l])
				break
			elif a - x <= d:
				print(*[a, l, l + (a - x)])
				break
main()


t = int(input())
for tt in range(t):
	(l, r, m) = map(int, input().split())
	if l == 1 and m == 1:
		print(1, 1, 1)
	elif l == 1:
		for i in range(2, r + 1, 1):
			if m % i == 0 or m % i <= r - l:
				k = m % i
				print(i, l + k, l)
				break
			elif i - m % i <= r - l:
				k = i - m % i
				print(i, l, l + k)
				break
	elif m >= l and l > 1:
		for i in range(r, l - 1, -1):
			if m % i == 0 or m % i <= r - l:
				k = m % i
				print(i, l + k, l)
				break
			elif i - m % i <= r - l:
				k = i - m % i
				print(i, l, l + k)
				break
	elif m < l:
		k = l - m
		print(l, l, l + k)


import math
from collections import *
import sys
inp = sys.stdin.readline

def linp(x):
	return list(map(int, x.split()))

def minp(x):
	return map(int, x.split())

def main():
	t = int(inp())
	while t > 0:
		(l, r, m) = minp(inp())
		ma = r - l
		for i in range(l, r + 1):
			if m % i <= ma and m >= i:
				print(i, l + m % i, l)
				break
			if i - m % i <= ma:
				print(i, l, l + i - m % i)
				break
		t -= 1
main()


for _ in range(int(input())):
	(l, r, m) = map(int, input().split())
	mi = m
	mip = max(r, m)
	for i in range(l, r + 1):
		temp = m % i
		mi = min(mi, temp)
		mip = min(mip, i - temp)
		if mi <= r - l and m - mi != 0:
			print(i, r, r - mi, sep=' ')
			break
		if mip <= r - l:
			print(i, r - mip, r, sep=' ')
			break


for i in range(int(input())):
	(l, r, m) = map(int, input().split())
	low = l - r
	high = r - l
	for a in range(l, r + 1):
		d1 = m // a
		d2 = d1 + 1
		if d1 == 0:
			d1 = 1
		if abs(d1 * a - m) <= high:
			e = m - d1 * a
			if e > 0:
				c = l
				b = l + e
			else:
				b = l
				c = l + abs(e)
			break
		elif abs(d2 * a - m) <= high:
			e = m - d2 * a
			if e > 0:
				c = l
				b = l + e
			else:
				b = l
				c = l + abs(e)
			break
	print(a, b, c)


import sys
t = int(input())
for i in range(t):
	(l, r, m) = map(int, input().split())
	a = l
	while True:
		if m < a:
			diff = a - m
			if diff <= r - l:
				c = r
				b = c - diff
				if b <= r and b >= l:
					sys.stdout.write(str(a) + ' ' + str(b) + ' ' + str(c) + '\n')
					break
		else:
			diff1 = m % a
			diff2 = a - diff1
			if diff1 <= r - l:
				b = r
				c = b - diff1
				if c <= r and c >= l:
					sys.stdout.write(str(a) + ' ' + str(b) + ' ' + str(c) + '\n')
					break
			if diff2 <= r - l:
				c = r
				b = c - diff2
				if b <= r and b >= l:
					sys.stdout.write(str(a) + ' ' + str(b) + ' ' + str(c) + '\n')
					break
		a += 1


from functools import reduce
import os
import sys
from math import *
from collections import *
from fractions import *
from bisect import *
from heapq import *
from io import BytesIO, IOBase
input = lambda : sys.stdin.readline().rstrip('\r\n')

def value():
	return tuple(map(int, input().split()))

def arr():
	return [int(i) for i in input().split()]

def sarr():
	return [i for i in input().split()]
t = int(input())
while t:
	t -= 1
	(l, r, m) = value()
	for i in range(l, r + 1):
		if m % i == 0:
			print(i, r, r)
			break
		else:
			res = m % i
			if i - res <= r - l:
				print(i, r - (i - res), r)
				break
			if res <= r - l:
				print(i, r, r - res)
				break


t = int(input())
for ii in range(t):
	(l, r, m) = map(int, input().split())
	diff = r - l
	found = -1
	if m < l:
		for i in range(r, l - 1, -1):
			if i - m % i <= diff:
				found = i
				break
		print(found, l, l + (found - m % found))
	else:
		for i in range(r, l - 1, -1):
			if m % i <= diff:
				found = i
				break
		if found == -1:
			for i in range(r, l - 1, -1):
				if i - m % i <= diff:
					found = i
					break
			print(found, l, l + (found - m % found))
		else:
			print(found, r, r - m % found)


import sys
input = sys.stdin.readline

def solution():
	(l, r, m) = map(int, input().split())
	lr_diff = r - l
	MAX_left = m - l + r
	b = l
	c = r
	for a in range(l, r + 1):
		R = MAX_left % a
		if R > lr_diff * 2:
			continue
		else:
			b += min(lr_diff, R)
			R -= min(lr_diff, R)
			c -= min(lr_diff, R)
			print(a, b, c)
			break
T = int(input())
for _ in range(T):
	solution()


import math
t = int(input())
rez = []
for i in range(t):
	A = input().split(' ')
	l = int(A[0])
	r = int(A[1])
	m = int(A[2])
	raz = r - l
	for j in range(l, r + 1):
		if m % j <= raz and m // j != 0:
			a = j
			b = l + m % j
			c = l
			rez.append(str(a) + ' ' + str(b) + ' ' + str(c))
			break
		elif j - m % j <= raz:
			a = j
			b = l
			c = l + j - m % j
			rez.append(str(a) + ' ' + str(b) + ' ' + str(c))
			break
for i in range(len(rez)):
	print(rez[i])


t = int(input())
for _ in range(t):
	(l, r, m) = map(int, input().split())
	diff = r - l
	for cand in range(l, r + 1):
		if m % cand <= diff:
			needed = m - m // cand * cand
			if m // cand != 0:
				print(cand, r, r - needed)
			else:
				needed = cand - m
				print(cand, r - needed, r)
			break
		elif abs((m // cand + 1) * cand - m) <= diff:
			print(cand, r - abs((m // cand + 1) * cand - m), r)
			break


for _ in range(int(input())):
	(l, r, m) = map(int, input().split())
	b = r - l
	for i in range(l, r + 1):
		if m % i <= b:
			a = i
			zz = m // i
			break
		elif i * (m // i + 1) - m <= b:
			a = i
			zz = m // i + 1
			break
	if zz == 0:
		rem = m - a
	else:
		rem = m - a * zz
	if rem >= 0:
		bb = r
		cc = r - rem
	else:
		cc = r
		bb = r + rem
	print(a, bb, cc)


for _ in range(int(input())):
	(l, r, m) = map(int, input().split())
	for i in range(l, r + 1):
		n = (m + r - l) // i
		if n > 0 and n * i >= m + l - r:
			d = m - n * i
			if d < 0:
				print(i, r + d, r)
			else:
				print(i, l + d, l)
			break


def find(l, r, m):
	left = m - r + l
	right = m + r - l
	Flag = False
	n = -1
	for a in range(l, r + 1):
		L = left / a
		R = right / a
		I = int(R)
		if I >= L:
			n = I
			Flag = True
			break
	if not Flag:
		return (-1, -1, -1)
	Flag = False
	for c in range(l, r + 1):
		b = m - n * a + c
		if b >= l and b <= r:
			Flag = True
			break
	if not Flag:
		return (-1, -1, -1)
	return (a, b, c)
for _ in range(int(input())):
	(l, r, m) = list(map(int, input().strip().split()))
	(a, b, c) = find(l, r, m)
	print(a, b, c)


import sys
input = sys.stdin.readline

def solve(l, r, m):
	for a in range(l, r + 1):
		p = m % a
		if m // a > 0 and p <= r - l:
			return (a, l + p, l)
		q = a - p
		if q <= r - l:
			return (a, l, l + q)
Q = int(input())
for _ in range(Q):
	(l, r, m) = map(int, input().split())
	print(*solve(l, r, m))


import sys

def input():
	return sys.stdin.readline().strip()

def list2d(a, b, c):
	return [[c] * b for i in range(a)]

def list3d(a, b, c, d):
	return [[[d] * c for j in range(b)] for i in range(a)]

def list4d(a, b, c, d, e):
	return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]

def ceil(x, y=1):
	return int(-(-x // y))

def INT():
	return int(input())

def MAP():
	return map(int, input().split())

def LIST(N=None):
	return list(MAP()) if N is None else [INT() for i in range(N)]

def Yes():
	print('Yes')

def No():
	print('No')

def YES():
	print('YES')

def NO():
	print('NO')
INF = 10 ** 19
MOD = 10 ** 9 + 7
for _ in range(INT()):
	(l, r, m) = MAP()
	for a in range(l, r + 1):
		need = m % a
		n = m // a
		if n != 0:
			b = r
			c = r - need
			if c >= l:
				print(a, b, c)
				break
		need = -m % a
		n = m // a + 1
		if n != 0:
			c = r
			b = r - need
			if b >= l:
				print(a, b, c)
				break


for _ in range(int(input())):
	(l, r, m) = map(int, input().split())
	hak = r - l
	printed = 0
	for i in range(l, r + 1):
		rem = m % i
		if rem <= hak and rem != m:
			print(i, l + rem, l)
			printed = 1
		if printed == 1:
			break
		if i - rem <= hak:
			print(i, l, l + i - rem)
			printed = 1
		if printed == 1:
			break


from sys import stdin, stdout
from math import gcd, sqrt
from collections import deque
input = stdin.readline
R = lambda : map(int, input().split())
I = lambda : int(input())
S = lambda : input().rstrip('\n')
L = lambda : list(R())
P = lambda x: stdout.write(x)
lcm = lambda x, y: x * y // gcd(x, y)
hg = lambda x, y: (y + x - 1) // x * x
pw = lambda x: 1 if x == 1 else 1 + pw(x // 2)
chk = lambda x: chk(x // 2) if not x % 2 else True if x == 1 else False
sm = lambda x: (x ** 2 + x) // 2
N = 10 ** 9 + 7
for _ in range(I()):
	(l, r, m) = R()
	if m <= l:
		print(l, l, 2 * l - m)
	else:
		v = l
		d = m % l
		a = l + d
		b = l
		for i in range(l, r + 1):
			nd = m % i
			md = i - m % i
			if md < nd:
				nd = -md
			if abs(nd) < d:
				d = abs(nd)
				v = i
				if nd < 0:
					(a, b) = (l, l + d)
				else:
					(a, b) = (l + d, l)
		print(v, a, b)


for cases in range(int(input())):
	(l, r, m) = map(int, input().split())
	d = r - l
	for i in range(l, r + 1):
		if (m + d) // i - max((m - d - 1) // i, 0) > 0:
			a = i
			val = m - a * ((m + d) // i)
			c = max(l, l - val)
			b = c + val
			break
	print(a, b, c)


from math import *
from sys import *
input = stdin.readline
for _ in range(int(input())):
	(l, r, m) = map(int, input().split())
	d = r - l
	a = -1
	k = -1
	for i in range(l, r + 1):
		if i <= m:
			k1 = m % i
			k2 = -(-m // i) * i - m
			if 0 <= k1 <= d:
				k = k1
				a = i
				break
			if 0 <= k2 <= d:
				k = -k2
				a = i
				break
		else:
			a = i
			k = m - a
			break
	if k < 0:
		(a, b, c) = (a, l, l - k)
	else:
		(a, b, c) = (a, r, r - k)
	print(a, b, c)


T = int(input())
for _ in range(T):
	(l, r, m) = map(int, input().split())
	if l <= m <= r:
		a = m
		b = l
		c = l
	elif m < l:
		a = l
		b = l
		c = l + (l - m)
	else:
		prev = r + 1
		for i in range(r, l - 1, -1):
			if m % i <= r - l:
				a = i
				b = l + m % i
				c = l
				break
			if i - m % i <= r - l:
				a = i
				b = r - (i - m % i)
				c = r
				break
	print(a, b, c)


import math
import heapq, bisect
import sys
from collections import deque, defaultdict
from fractions import Fraction
mod = 10 ** 9 + 7
mod1 = 998244353
import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

class TreeNode:

	def __init__(self, k, v):
		self.key = k
		self.value = v
		self.left = None
		self.right = None
		self.parent = None
		self.height = 1
		self.num_left = 1
		self.num_total = 1

class AvlTree:

	def __init__(self):
		self._tree = None

	def add(self, k, v):
		if not self._tree:
			self._tree = TreeNode(k, v)
			return
		node = self._add(k, v)
		if node:
			self._rebalance(node)

	def _add(self, k, v):
		node = self._tree
		while node:
			if k < node.key:
				if node.left:
					node = node.left
				else:
					node.left = TreeNode(k, v)
					node.left.parent = node
					return node.left
			elif node.key < k:
				if node.right:
					node = node.right
				else:
					node.right = TreeNode(k, v)
					node.right.parent = node
					return node.right
			else:
				node.value = v
				return

	@staticmethod
	def get_height(x):
		return x.height if x else 0

	@staticmethod
	def get_num_total(x):
		return x.num_total if x else 0

	def _rebalance(self, node):
		n = node
		while n:
			lh = self.get_height(n.left)
			rh = self.get_height(n.right)
			n.height = max(lh, rh) + 1
			balance_factor = lh - rh
			n.num_total = 1 + self.get_num_total(n.left) + self.get_num_total(n.right)
			n.num_left = 1 + self.get_num_total(n.left)
			if balance_factor > 1:
				if self.get_height(n.left.left) < self.get_height(n.left.right):
					self._rotate_left(n.left)
				self._rotate_right(n)
			elif balance_factor < -1:
				if self.get_height(n.right.right) < self.get_height(n.right.left):
					self._rotate_right(n.right)
				self._rotate_left(n)
			else:
				n = n.parent

	def _remove_one(self, node):
		replacement = node.left or node.right
		if node.parent:
			if AvlTree._is_left(node):
				node.parent.left = replacement
			else:
				node.parent.right = replacement
			replacement.parent = node.parent
			node.parent = None
		else:
			self._tree = replacement
			replacement.parent = None
		node.left = None
		node.right = None
		node.parent = None
		self._rebalance(replacement)

	def _remove_leaf(self, node):
		if node.parent:
			if AvlTree._is_left(node):
				node.parent.left = None
			else:
				node.parent.right = None
			self._rebalance(node.parent)
		else:
			self._tree = None
		node.parent = None
		node.left = None
		node.right = None

	def remove(self, k):
		node = self._get_node(k)
		if not node:
			return
		if AvlTree._is_leaf(node):
			self._remove_leaf(node)
			return
		if node.left and node.right:
			nxt = AvlTree._get_next(node)
			node.key = nxt.key
			node.value = nxt.value
			if self._is_leaf(nxt):
				self._remove_leaf(nxt)
			else:
				self._remove_one(nxt)
			self._rebalance(node)
		else:
			self._remove_one(node)

	def get(self, k):
		node = self._get_node(k)
		return node.value if node else -1

	def _get_node(self, k):
		if not self._tree:
			return None
		node = self._tree
		while node:
			if k < node.key:
				node = node.left
			elif node.key < k:
				node = node.right
			else:
				return node
		return None

	def get_at(self, pos):
		x = pos + 1
		node = self._tree
		while node:
			if x < node.num_left:
				node = node.left
			elif node.num_left < x:
				x -= node.num_left
				node = node.right
			else:
				return (node.key, node.value)
		raise IndexError('Out of ranges')

	@staticmethod
	def _is_left(node):
		return node.parent.left and node.parent.left == node

	@staticmethod
	def _is_leaf(node):
		return node.left is None and node.right is None

	def _rotate_right(self, node):
		if not node.parent:
			self._tree = node.left
			node.left.parent = None
		elif AvlTree._is_left(node):
			node.parent.left = node.left
			node.left.parent = node.parent
		else:
			node.parent.right = node.left
			node.left.parent = node.parent
		bk = node.left.right
		node.left.right = node
		node.parent = node.left
		node.left = bk
		if bk:
			bk.parent = node
		node.height = max(self.get_height(node.left), self.get_height(node.right)) + 1
		node.num_total = 1 + self.get_num_total(node.left) + self.get_num_total(node.right)
		node.num_left = 1 + self.get_num_total(node.left)

	def _rotate_left(self, node):
		if not node.parent:
			self._tree = node.right
			node.right.parent = None
		elif AvlTree._is_left(node):
			node.parent.left = node.right
			node.right.parent = node.parent
		else:
			node.parent.right = node.right
			node.right.parent = node.parent
		bk = node.right.left
		node.right.left = node
		node.parent = node.right
		node.right = bk
		if bk:
			bk.parent = node
		node.height = max(self.get_height(node.left), self.get_height(node.right)) + 1
		node.num_total = 1 + self.get_num_total(node.left) + self.get_num_total(node.right)
		node.num_left = 1 + self.get_num_total(node.left)

	@staticmethod
	def _get_next(node):
		if not node.right:
			return node.parent
		n = node.right
		while n.left:
			n = n.left
		return n
avl = AvlTree()

class SegmentTree1:

	def __init__(self, data, default='z', func=lambda a, b: min(a, b)):
		self._default = default
		self._func = func
		self._len = len(data)
		self._size = _size = 1 << (self._len - 1).bit_length()
		self.data = [default] * (2 * _size)
		self.data[_size:_size + self._len] = data
		for i in reversed(range(_size)):
			self.data[i] = func(self.data[i + i], self.data[i + i + 1])

	def __delitem__(self, idx):
		self[idx] = self._default

	def __getitem__(self, idx):
		return self.data[idx + self._size]

	def __setitem__(self, idx, value):
		idx += self._size
		self.data[idx] = value
		idx >>= 1
		while idx:
			self.data[idx] = self._func(self.data[2 * idx], self.data[2 * idx + 1])
			idx >>= 1

	def __len__(self):
		return self._len

	def query(self, start, stop):
		if start == stop:
			return self.__getitem__(start)
		stop += 1
		start += self._size
		stop += self._size
		res = self._default
		while start < stop:
			if start & 1:
				res = self._func(res, self.data[start])
				start += 1
			if stop & 1:
				stop -= 1
				res = self._func(res, self.data[stop])
			start >>= 1
			stop >>= 1
		return res

	def __repr__(self):
		return 'SegmentTree({0})'.format(self.data)

class SegmentTree:

	def __init__(self, data, default=0, func=lambda a, b: a + b):
		self._default = default
		self._func = func
		self._len = len(data)
		self._size = _size = 1 << (self._len - 1).bit_length()
		self.data = [default] * (2 * _size)
		self.data[_size:_size + self._len] = data
		for i in reversed(range(_size)):
			self.data[i] = func(self.data[i + i], self.data[i + i + 1])

	def __delitem__(self, idx):
		self[idx] = self._default

	def __getitem__(self, idx):
		return self.data[idx + self._size]

	def __setitem__(self, idx, value):
		idx += self._size
		self.data[idx] = value
		idx >>= 1
		while idx:
			self.data[idx] = self._func(self.data[2 * idx], self.data[2 * idx + 1])
			idx >>= 1

	def __len__(self):
		return self._len

	def query(self, start, stop):
		if start == stop:
			return self.__getitem__(start)
		stop += 1
		start += self._size
		stop += self._size
		res = self._default
		while start < stop:
			if start & 1:
				res = self._func(res, self.data[start])
				start += 1
			if stop & 1:
				stop -= 1
				res = self._func(res, self.data[stop])
			start >>= 1
			stop >>= 1
		return res

	def __repr__(self):
		return 'SegmentTree({0})'.format(self.data)

class Factorial:

	def __init__(self, MOD):
		self.MOD = MOD
		self.factorials = [1, 1]
		self.invModulos = [0, 1]
		self.invFactorial_ = [1, 1]

	def calc(self, n):
		if n <= -1:
			print('Invalid argument to calculate n!')
			print('n must be non-negative value. But the argument was ' + str(n))
			exit()
		if n < len(self.factorials):
			return self.factorials[n]
		nextArr = [0] * (n + 1 - len(self.factorials))
		initialI = len(self.factorials)
		prev = self.factorials[-1]
		m = self.MOD
		for i in range(initialI, n + 1):
			prev = nextArr[i - initialI] = prev * i % m
		self.factorials += nextArr
		return self.factorials[n]

	def inv(self, n):
		if n <= -1:
			print('Invalid argument to calculate n^(-1)')
			print('n must be non-negative value. But the argument was ' + str(n))
			exit()
		p = self.MOD
		pi = n % p
		if pi < len(self.invModulos):
			return self.invModulos[pi]
		nextArr = [0] * (n + 1 - len(self.invModulos))
		initialI = len(self.invModulos)
		for i in range(initialI, min(p, n + 1)):
			next = -self.invModulos[p % i] * (p // i) % p
			self.invModulos.append(next)
		return self.invModulos[pi]

	def invFactorial(self, n):
		if n <= -1:
			print('Invalid argument to calculate (n^(-1))!')
			print('n must be non-negative value. But the argument was ' + str(n))
			exit()
		if n < len(self.invFactorial_):
			return self.invFactorial_[n]
		self.inv(n)
		nextArr = [0] * (n + 1 - len(self.invFactorial_))
		initialI = len(self.invFactorial_)
		prev = self.invFactorial_[-1]
		p = self.MOD
		for i in range(initialI, n + 1):
			prev = nextArr[i - initialI] = prev * self.invModulos[i % p] % p
		self.invFactorial_ += nextArr
		return self.invFactorial_[n]

class Combination:

	def __init__(self, MOD):
		self.MOD = MOD
		self.factorial = Factorial(MOD)

	def ncr(self, n, k):
		if k < 0 or n < k:
			return 0
		k = min(k, n - k)
		f = self.factorial
		return f.calc(n) * f.invFactorial(max(n - k, k)) * f.invFactorial(min(k, n - k)) % self.MOD

def powm(a, n, m):
	if a == 1 or n == 0:
		return 1
	if n % 2 == 0:
		s = powm(a, n // 2, m)
		return s * s % m
	else:
		return a * powm(a, n - 1, m) % m

def sort_list(list1, list2):
	zipped_pairs = zip(list2, list1)
	z = [x for (_, x) in sorted(zipped_pairs)]
	return z

def product(l):
	por = 1
	for i in range(len(l)):
		por *= l[i]
	return por

def binarySearchCount(arr, n, key):
	left = 0
	right = n - 1
	count = 0
	while left <= right:
		mid = int((right + left) / 2)
		if arr[mid] <= key:
			count = mid + 1
			left = mid + 1
		else:
			right = mid - 1
	return count

def countdig(n):
	c = 0
	while n > 0:
		n //= 10
		c += 1
	return c

def countGreater(arr, n, k):
	l = 0
	r = n - 1
	leftGreater = n
	while l <= r:
		m = int(l + (r - l) / 2)
		if arr[m] >= k:
			leftGreater = m
			r = m - 1
		else:
			l = m + 1
	return n - leftGreater
for ik in range(int(input())):
	(l, r, m) = map(int, input().split())
	rem = [m % i for i in range(l, r + 1)]
	rem1 = [i - m % i for i in range(l, r + 1)]
	maxdif = min(r - l, m)
	for i in range(l, r + 1):
		if rem[i - l] != m and rem[i - l] <= maxdif:
			b = l + rem[i - l]
			c = l
			a = i
			print(a, b, c)
			break
		elif rem1[i - l] <= r - l:
			c = l + rem1[i - l]
			b = l
			a = i
			print(a, b, c)
			break


t = int(input())
for _ in range(t):
	(l, r, m) = map(int, input().split())
	if m < l:
		a = l
		b = l
		c = 2 * l - m
		print(a, b, c)
	else:
		for i in range(l, r + 1):
			temp = m % i
			if temp <= r - l and temp >= 0:
				a = i
				b = l + temp
				c = l
				print(a, b, c)
				break
			elif i - temp <= r - l and temp >= 0:
				a = i
				b = l
				c = l + (i - temp)
				print(a, b, c)
				break


for _ in range(int(input())):
	(l, r, m) = map(int, input().split())
	rem = r - l
	for i in range(l, r + 1):
		rem1 = m % i
		if rem1 <= rem and m >= i:
			print(i, l + rem1, l)
			break
		elif rem1 >= i - rem:
			print(i, l, l + i - rem1)
			break


import io
import os
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline

def get_str():
	return input().decode().strip()

def rint():
	return map(int, input().split())

def oint():
	return int(input())
t = oint()
for _ in range(t):
	(l, r, m) = rint()
	for a in range(l, r + 1):
		n1 = m // a
		n2 = n1 + 1
		if n1 == 0:
			n1 += 1
		diff1 = m - n1 * a
		diff2 = m - n2 * a
		if abs(diff1) < abs(diff2):
			n = n1
		else:
			n = n2
		diff = m - n * a
		if abs(diff) <= r - l:
			if diff > 0:
				b = r
				c = b - diff
			else:
				b = l
				c = b - diff
			break
	print(a, b, c)


for _ in range(int(input())):
	(l, r, m) = (int(x) for x in input().split())
	w = r - l
	pp = l - r
	dic = dict()
	for i in range(100):
		if i not in dic:
			dic[i] = 1
	for i in range(l, r + 1):
		if m % i >= 0 and m % i <= w % i:
			if m != m % i:
				print(i, l + m % i, l)
				break
		if m % i >= (pp % i + i) % i and m % i <= i - 1:
			print(i, l, l - m % i + i)
			break


for _ in range(int(input())):
	(l, r, m) = map(int, input().split())
	q = m % l
	w = m % r
	if l > m:
		print(l, l, l + (l - q))
	else:
		for i in range(l, r + 1):
			q = m % i
			q1 = m // i
			q1 = i * (q1 + 1) - m
			if q == 0:
				print(i, i, i)
				break
			elif i + q <= r:
				print(i, i + q, i)
				break
			elif i - q >= l:
				print(i, i, i - q)
				break
			elif i + q1 <= r:
				print(i, i, i + q1)
				break
			elif i - q1 >= l:
				print(i, i - q1, i)
				break


import math
t = int(input().strip())
while t:
	t -= 1
	(l, r, m) = list(map(int, input().strip().split()))
	min_m = m - (r - l)
	max_m = m + (r - l)
	for a in range(l, r + 1):
		if math.floor(m / a) == m / a:
			print(a, l, l)
			break
		elif min_m != 0 and min_m % a == 0:
			print(a, r, l)
			break
		elif max_m % a == 0:
			print(a, l, r)
			break
		if math.floor(min_m / a) != math.floor(max_m / a):
			n = math.floor(max_m / a)
			left = m - n * a
			if left < 0:
				b = l
			else:
				b = r
			c = b - left
			print(a, b, c)
			break


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	(l, r, m) = [int(x) for x in input().split()]
	for i in range(l, r + 1):
		(temp1, temp2) = (m // i, (m + i - 1) // i)
		if temp1 != 0 and m - temp1 * i < r - l + 1:
			print(i, l + m - temp1 * i, l)
			break
		if temp2 != 0 and temp2 * i - m < r - l + 1:
			print(i, l, l + temp2 * i - m)
			break


import os
import sys
from io import BytesIO, IOBase
from collections import Counter
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))

def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)

def lcm(a, b):
	return a * b / gcd(a, b)

def main():
	for _ in range(int(input())):
		(l, r, m) = map(int, input().split())
		for i in range(l, r + 1):
			k1 = m % i
			k2 = i - k1
			if k1 <= r - l and k1 != m:
				print(i, l + k1, l)
				break
			elif k2 <= r - l:
				print(i, l, l + k2)
				break
	return
main()


cases = int(input())
for t in range(cases):
	(l, r, m) = list(map(int, input().split()))
	var = r - l
	ndmax = m + var
	ndmin = m - var
	for a in range(l, r + 1):
		nd = ndmax // a
		v = nd * a
		left = m - v
		if v >= ndmin and v <= ndmax:
			if left >= -var and left < 0:
				print(a, left + r, r)
				break
			elif left >= 0 and left <= var:
				print(a, left + l, l)
				break


import sys
from operator import itemgetter

def get_input():
	return map(int, sys.stdin.readline().split())

def mod(j):
	global m
	return m % j
t = int(input())
while t:
	(l, r, m) = get_input()
	if m < l:
		a = l
		b = r + m - l
		c = r
	elif m > r:
		lst1 = [i for i in range(l, r + 1)]
		lstk = list(map(mod, lst1))
		lstak = [a - k for (a, k) in zip(lst1, lstk)]
		x = min(enumerate(lstk), key=itemgetter(1))[0]
		y = min(enumerate(lstak), key=itemgetter(1))[0]
		if min(lstk[x], lstak[y]) == lstk[x]:
			a = lst1[x]
			b = r
			c = r - lstk[x]
		else:
			a = lst1[y]
			b = l
			c = l + lstak[y]
	else:
		a = b = c = m
	print(str(a) + ' ' + str(b) + ' ' + str(c))
	t -= 1


t = int(input())
for tt in range(t):
	(l, r, m) = map(int, input().split())
	for i in range(l, r + 1):
		a = i
		foo = max(i, m // a * a)
		c = l
		b = m - foo + c
		foo2 = max(i, (m // a + 1) * a)
		c2 = r
		b2 = m - foo2 + c2
		if l <= b and b <= r and (b > 0):
			break
		if l <= b2 and b2 <= r:
			b = b2
			c = c2
			break
	print(a, b, c)


import sys
input = sys.stdin.buffer.readline

def solution():
	(l, r, m) = map(int, input().split())
	d = r - l
	for i in range(l, r + 1):
		v = m % i
		if v <= d and m >= i:
			print(i, l + v, l)
			break
		elif v >= i - d:
			print(i, l, l + i - v)
			break
for _ in range(int(input())):
	solution()


import sys
t = int(sys.stdin.readline())
for _ in range(t):
	(l, r, m) = map(int, sys.stdin.readline().split())
	for i in range(l, r + 1):
		b = m % i
		if 0 <= i - b <= r - l:
			print(i, l, l + (i - b))
			break
		elif 0 <= b <= r - l and m - b != 0:
			print(i, l + b, l)
			break


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	(l, r, m) = map(int, input().split())
	for a in range(l, r + 1):
		if (m - r + l) % a == 0 or (m + r - l) % a == 0 or ((m - r + l) % a >= (m + r - l) % a and l != r):
			rem = m % a
			if rem <= r - l and a <= m:
				b = r
				c = r - rem
			else:
				b = l
				c = l + a - rem
			print(a, b, c)
			break


t = int(input())
for _ in range(t):
	(l, r, m) = map(int, input().split())
	if l <= m <= r:
		print(m, l, l)
	elif l == r:
		print(l, l, l)
	else:
		found = False
		for a in range(l, r + 1):
			if a >= m:
				k1 = (m + r - l) // a
				k2 = m / a
				if m % a == 0:
					print(a, l, l)
					found = True
					break
				elif k1 > k2:
					q = m - a * k1
					print(a, l, l - q)
					break
			else:
				k1 = (m + r - l) // a
				k2 = (m + l - r) / a
				if k1 > k2:
					if m - a * k1 <= 0:
						print(a, l, l - (m - a * k1))
					else:
						print(a, l + (m - a * k1), l)
					break
				elif (m + l - r) // a > 0 and (m + l - r) % a == 0:
					print(a, r, l)
					break


for _ in range(int(input())):
	(l, r, m) = map(int, input().split())
	for a in range(l, r + 1):
		if m % a == 0:
			c = r
			b = r - a
			print(a, l, l)
			break
		else:
			d = (m // a + 1) * a - m
			d1 = m % a
			if r - d >= l:
				print(a, r - d, r)
				break
			elif r - d1 >= l:
				print(a, r, r - d1)
				break


def solution(l, r, n):
	for a in range(r, l - 1, -1):
		if n % a <= r - l and n - n % a > 0:
			return (a, l + n % a, l)
		elif a - n % a <= r - l and n + a - n % a > 0:
			return (a, l, l + a - n % a)
for _ in range(int(input())):
	(a, b, c) = map(int, input().split())
	print(*solution(a, b, c))


import sys
reader = (s.rstrip() for s in sys.stdin)
input = reader.__next__
t = int(input())
for _ in range(t):
	(l, r, m) = map(int, input().split())
	maxDiff = r - l

	def check():
		for a in range(l, r + 1):
			mod1 = m % a
			mod2 = a - mod1
			if mod2 <= maxDiff:
				return (a, mod2)
			if mod1 <= maxDiff:
				return (a, -mod1)
	(a, mod) = check()
	(a, b, c) = (a, a, a)
	if mod >= 0:
		c = l + abs(mod)
		b = l
	else:
		b = l + abs(mod)
		c = l
	print(a, b, c)


t = int(input())
for j in range(t):
	(l, r, m) = map(int, input().split())
	diff = abs(l - r)
	for j in range(l, r + 1):
		rem1 = m % j
		rem2 = j * (m // j + 1) - m
		if m // j == 0 or (rem2 < rem1 and rem2 <= diff):
			print(j, r - rem2, r)
			break
		elif rem1 < rem2 and rem1 <= diff:
			print(j, r, r - rem1)
			break
		else:
			continue


t = int(input())
for i in range(t):
	(l, r, m) = map(int, input().split())
	c = r - l
	for j in range(r, l - 1, -1):
		x = m % j
		y = j - x
		if m >= j and x <= c:
			print(j, l + x, l)
			break
		elif y <= c:
			print(j, l, l + y)
			break


t = int(input())
for _ in range(t):
	(l, r, m) = [int(x) for x in input().split()]
	if l <= m <= r:
		a = l
		c = l
		b = m
	elif m < l:
		a = l
		b = l
		c = 2 * l - m
	else:
		d = r - l
		for a in range(l, r + 1):
			n1 = m // a
			n2 = n1 + 1
			ok = False
			if m - n1 * a <= d:
				ok = True
				c = l
				b = m + c - n1 * a
			elif n2 * a - m <= d:
				ok = True
				b = l
				c = n2 * a - m + b
			if ok:
				break
	print('{} {} {}'.format(a, b, c))


T = int(input())
for t in range(T):
	(l, r, m) = map(int, input().split())
	d = False
	delta = r - l
	for i in range(l, r + 1):
		if m % i <= delta and m // i > 0:
			print(i, r, r - m % i)
			break
		elif i - m % i <= delta and m // i >= 0:
			print(i, l, l + (i - m % i))
			break


from sys import stdin, stdout, setrecursionlimit
from math import floor, gcd, fabs, factorial, fmod, sqrt, inf, log, log2
from random import seed, randint
from datetime import datetime
from collections import defaultdict as dd, deque
from heapq import merge, heapify, heappop, heappush, nsmallest
from bisect import bisect_left as bl, bisect_right as br, bisect
from collections import defaultdict as dd
mod = pow(10, 9) + 7
mod2 = 998244353

def inp():
	return stdin.readline().strip()

def iinp():
	return int(inp())

def out(var, end='\n'):
	stdout.write(str(var) + '\n')

def outa(*var, end='\n'):
	stdout.write(' '.join(map(str, var)) + end)

def lmp():
	return list(mp())

def mp():
	return map(int, inp().split())

def smp():
	return map(str, inp().split())

def l1d(n, val=0):
	return [val for i in range(n)]

def l2d(n, m, val=0):
	return [l1d(m, val) for j in range(n)]

def remadd(x, y):
	return 1 if x % y else 0

def ceil(a, b):
	return (a + b - 1) // b

def def_value():
	return 0

def def_inf():
	return inf
for _ in range(iinp()):
	(l, r, m) = mp()
	low = max(m - r + l, 0)
	high = m + r - l
	for a in range(l, r + 1):
		x = high // a * a
		if x >= low and x > 0:
			if x >= m:
				print(a, l, x - m + l)
			else:
				print(a, m - x + l, l)
			break


for i in range(int(input())):
	(l, r, m) = list(map(int, input().split()))
	co = r - l
	for i in range(l, r + 1):
		rem = m % i
		if rem >= 0 and rem <= r - l and (rem != m):
			print('%d %d %d' % (i, rem + l, l))
			break
		rem = i - rem
		if rem >= 0 and rem <= r - l:
			print('%d %d %d' % (i, l, l + rem))
			break


import sys
import math, bisect
from itertools import groupby, accumulate
from heapq import heapify, heappop, heappush
from collections import deque, Counter, OrderedDict
input = iter(sys.stdin.buffer.read().decode().splitlines()).__next__

def neo():
	return map(int, input().split())

def Neo():
	return list(map(int, input().split()))
for _ in range(int(input())):
	(l, r, m) = neo()
	(f1, f2) = (0, 0)
	for i in range(l, r + 1):
		t = m % i
		p = i - t
		if l + t <= r and m - t > 0:
			f1 = 1
			break
		if l + p <= r:
			f2 = 1
			break
	if f1 == 1:
		print(i, l + t, l)
	elif f2 == 1:
		print(i, l, l + p)


t = int(input())
for e in range(t):
	arr = [int(i) for i in input().split(' ')]
	(l, r, m) = (arr[0], arr[1], arr[2])
	diff = r - l
	for i in range(l, r + 1):
		d = m % i
		if d <= diff and m != d:
			print(i, r, r - d)
			break
		elif i - d <= diff:
			print(i, r - (i - d), r)
			break


T = int(input())
for _ in range(T):
	(l, r, m) = map(int, input().split())
	(mi, ma) = (l - r, r - l)
	an = 0
	for i in range(l, r + 1):
		y = m % i
		x = m // i
		(fi, se) = (-y, i - y)
		if x != 0:
			if mi <= fi and fi <= ma:
				an = fi
				break
			elif mi <= se and se <= ma:
				an = se
				break
		elif mi <= se and se <= ma:
			an = se
			break
	if an < 0:
		print(i, r, r + an)
	else:
		print(i, l, l + an)


from sys import stdin
from collections import deque
mod = 10 ** 9 + 7
import sys
import random
from queue import PriorityQueue
from collections import Counter as cc
from bisect import bisect_right
from bisect import bisect_left
from collections import defaultdict
from math import sqrt, factorial, gcd, log2, inf, ceil
import heapq
input = lambda : sys.stdin.readline().rstrip()
from sys import stdin, stdout
from heapq import heapify, heappush, heappop
from itertools import permutations
from math import factorial as f

def ncr(n, r, p):
	num = den = 1
	for i in range(r):
		num = num * (n - i) % p
		den = den * (i + 1) % p
	return num * pow(den, p - 2, p) % p
import sys
t = int(input())
for _ in range(t):
	(l, r, m) = map(int, input().split())
	(x, y, z) = (-1, -1, -1)
	for i in range(l, r + 1):
		z1 = r - l
		k = (m + z1) // i
		d = m - i * k
		if k > 0:
			if l <= l - d <= r:
				(x, y, z) = (i, l, l - d)
			elif l <= l + d <= r:
				(x, y, z) = (i, l + d, l)
			elif l <= r - d <= r:
				(x, y, z) = (i, r, r - d)
			elif l <= r + d <= r:
				(x, y, z) = (i, r + d, r)
	print(x, y, z)


import os, io
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
t = int(input())
for _ in range(t):
	(l, r, m) = map(int, input().split())
	for a in range(l, r + 1):
		if a <= r - l or (m % a <= r - l and m > a) or m % a >= a - r + l:
			break
	if a <= r - l:
		print(str(a) + ' ' + str(l) + ' ' + str(l + a - m % a))
	elif m % a <= r - l and m >= a:
		print(str(a) + ' ' + str(l + m % a) + ' ' + str(l))
	else:
		print(str(a) + ' ' + str(l) + ' ' + str(l + a - m % a))


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, copy, functools
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
mod2 = 998244353
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return list(map(int, sys.stdin.readline().split()))

def LLI():
	return [list(map(int, l.split())) for l in sys.stdin.readlines()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def pe(s):
	return print(str(s), file=sys.stderr)

def JA(a, sep):
	return sep.join(map(str, a))

def JAA(a, s, t):
	return s.join((t.join(map(str, b)) for b in a))

def IF(c, t, f):
	return t if c else f

def YES(c):
	return IF(c, 'YES', 'NO')

def Yes(c):
	return IF(c, 'Yes', 'No')

def main():
	t = I()
	rr = []
	for _ in range(t):
		(l, r, m) = LI()
		s = r - l
		t = []
		for k in range(l, r + 1):
			b = m // k
			c = b * k
			if b > 0 and m - c <= s:
				t = [k, r, r - (m - c)]
				break
			c += k
			if c - m <= s:
				t = [k, r - (c - m), r]
				break
		rr.append(JA(t, ' '))
	return JA(rr, '\n')
print(main())


a = input()
for x in range(int(a)):
	b = input().split()
	ans_a = 0
	ans_b = 0
	ans_c = 0
	tag = 0
	for i in range(int(b[0]), int(b[1]) + 1):
		if int(b[2]) // i >= 1:
			if int(b[2]) % i <= int(b[1]) - int(b[0]):
				ans_a = i
				ans_b = int(b[1])
				ans_c = int(b[1]) - int(b[2]) % i
				tag = 1
			elif -(int(b[2]) % i - i) <= int(b[1]) - int(b[0]):
				ans_a = i
				ans_b = int(b[1]) + (int(b[2]) % i - i)
				ans_c = int(b[1])
				tag = 1
		elif -(int(b[2]) - i) <= int(b[1]) - int(b[0]):
			ans_a = i
			ans_b = int(b[1]) + (int(b[2]) - i)
			ans_c = int(b[1])
			tag = 1
		if tag == 1:
			break
	print(ans_a, ans_b, ans_c)


import sys
input = sys.stdin.readline
t = int(input())
for tt in range(t):
	(l, r, m) = map(int, input().split())
	for a in range(l, r + 1):
		mm = m % a
		if mm <= r - l and m > mm:
			print(a, end=' ')
			print(r, end=' ')
			print(r - mm, end=' ')
			print()
			break
		elif a - mm <= r - l:
			print(a, end=' ')
			print(l, end=' ')
			print(l + a - mm, end=' ')
			print()
			break


from sys import stdin, stdout
from itertools import combinations
from collections import defaultdict, Counter
import math

def listIn():
	return list(map(int, stdin.readline().strip().split()))

def stringListIn():
	return [x for x in stdin.readline().split()]

def intIn():
	return int(stdin.readline())

def stringIn():
	return stdin.readline().strip()
t = intIn()
while t > 0:
	t -= 1
	(l, r, m) = listIn()
	if m < l:
		print(l, l, 2 * l - m)
	else:
		for a in range(l, r + 1):
			mod = m % a
			if r - l >= mod:
				(b, c) = (r, r - mod)
				break
			else:
				n_mod = a - mod
				if r - l >= n_mod:
					(b, c) = (l, l + n_mod)
					break
		print(a, b, c)


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	(l, r, m) = map(int, input().split())
	d = r - l
	for i in range(l, r + 1):
		if m % i <= d:
			if m // i:
				print(i, r, r - m % i)
				break
		if m % i >= i - d:
			print(i, l, l + -m % i)
			break


tests_number = int(input())
for _ in range(tests_number):
	(l, r, m) = list(map(int, input().split()))
	left_border = max(1, m + l - r)
	right_border = m + r - l
	result = (0, 0, 0)
	for a in range(l, r + 1):
		L = (left_border + a - 1) // a
		R = right_border // a
		if L <= R:
			s = L * a - m
			b = l
			c = s + b
			if c < l:
				dlt = l - c
				c += dlt
				b += dlt
			result = (a, b, c)
			break
	(a, b, c) = result
	n = m - b + c
	assert n % a == 0
	n //= a
	assert n > 0
	print(a, b, c)


for _ in range(0, int(input())):
	(l, r, m) = map(int, input().split(' '))
	v = r - l
	for i in range(l, r + 1):
		d = m % i
		if d <= v and i <= m:
			print(i, l + d, l)
			break
		elif i - d <= v:
			print(i, l, l + i - d)
			break


import sys
input = sys.stdin.readline
t = int(input())
for tt in range(t):
	(l, r, m) = map(int, input().split())
	(a, k) = (0, 0)
	can = False
	for x in range(l, r + 1):
		n = (m + r - l) // x
		if n > 0 and m + l - r <= x * n <= m + r - l:
			(a, k) = (x, n)
			break
	if a * k == m:
		print(a, l, l)
	elif a * k < m:
		print(a, r, r - m + a * k)
	else:
		print(a, l, l + a * k - m)


def main():
	t = int(input())
	for _ in range(t):
		(l, r, m) = map(int, input().split())
		d = r - l
		for i in range(l, r + 1):
			ln = i * (m // i)
			un = ln + i
			if m - ln <= d and ln > 0:
				print(i, r, ln + r - m)
				break
			elif un - m <= d:
				print(i, l, un + l - m)
				break
main()


for _ in range(int(input())):
	(l, r, m) = map(int, input().split())
	diff = r - l
	ans = 0
	flag = 0
	high = m + diff
	low = max(1, m - diff)
	for i in range(l, r + 1):
		if m - m % i >= low:
			c = l
			b = l + m % i
			a = i
			break
		elif m + i - m % i <= high:
			b = l
			a = i
			c = l + (i - m % i)
			break
	print(a, b, c)


t = int(input())
check = 1
for i in range(t):
	(l, r, m) = map(int, input().split())
	for j in range(l, r + 1):
		n = (m + r - l) // j
		if n > 0 and n * j <= m + r - l and (n * j >= m - r + l):
			a = j
			b = l
			c = l - m + n * a
			if c >= l and c <= r:
				break
			else:
				b = r
				c = r - m + n * a
	print(a, b, c)


import os
import sys
from io import BytesIO, IOBase

def main():
	t = int(input())
	for i in range(t):
		(l, r, m) = list(map(int, input().split()))
		mxdiff = r - l
		f = True
		if l > m:
			print(l, l, l + l - m)
			continue
		for j in range(l, r + 1):
			temp = m % j
			if temp <= mxdiff:
				a = j
				mdiff = temp
				break
			elif j - temp <= mxdiff:
				a = j
				mdiff = j - temp
				f = False
				break
		if f:
			print(a, l + mdiff, l)
		else:
			print(a, l, l + mdiff)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


from sys import stdin
inp = lambda : stdin.readline().strip()
t = int(inp())
for _ in range(t):
	(l, r, m) = [int(x) for x in inp().split()]
	for i in range(l, r + 1):
		n = (m + r - l) // i
		if n > 0 and m - (r - l) <= n * i <= m + (r - l):
			if n * i <= m:
				print(i, r, r - abs(m - n * i))
			else:
				print(i, l, l + abs(m - n * i))
			break


from bisect import *
from collections import *
from itertools import *
import functools
import sys
import math
from decimal import *
from copy import *
from heapq import *
from fractions import *
getcontext().prec = 30
MAX = sys.maxsize
MAXN = 1000010
MOD = 10 ** 9 + 7
spf = [i for i in range(MAXN)]
spf[0] = spf[1] = -1

def sieve():
	for i in range(2, MAXN, 2):
		spf[i] = 2
	for i in range(3, int(MAXN ** 0.5) + 1):
		if spf[i] == i:
			for j in range(i * i, MAXN, i):
				if spf[j] == j:
					spf[j] = i

def fib(n, m):
	if n == 0:
		return [0, 1]
	else:
		(a, b) = fib(n // 2)
		c = a % m * (b % m * 2 - a % m) % m
		d = a % m * (a % m) % m + b % m * b % m % m
		if n % 2 == 0:
			return [c, d]
		else:
			return [d, c + d]

def charIN(x=' '):
	return sys.stdin.readline().strip().split(x)

def arrIN(x=' '):
	return list(map(int, sys.stdin.readline().strip().split(x)))

def ncr(n, r):
	num = den = 1
	for i in range(r):
		num = num * (n - i) % MOD
		den = den * (i + 1) % MOD
	return num * pow(den, MOD - 2, MOD) % MOD

def flush():
	return sys.stdout.flush()
for _ in range(int(input())):
	(l, r, m) = arrIN()
	rem = MAX
	k = -1
	f = 0
	for i in range(l, r + 1):
		if m % i == 0:
			a = i
			b = c = r
			f = 1
			break
		else:
			x = m % i
			if x <= r - l and m - x != 0:
				rem = x
				k = i
			elif i - x <= r - l:
				rem = x - i
				k = i
	if f:
		print(a, b, c)
	elif rem > 0:
		c = l
		b = l + rem
		a = k
		print(a, b, c)
	else:
		c = r
		b = r + rem
		a = k
		print(a, b, c)


for _ in range(int(input())):
	(l, r, m) = [int(n) for n in input().split()]
	x = r - l
	for i in range(r, l - 1, -1):
		d = m % i
		e = i - d
		if d <= x and m >= i:
			print(i, r, r - d)
			break
		if e <= x:
			print(i, l, l + e)
			break


import os
import sys
from io import BytesIO, IOBase
import random

def main():
	t = int(input())
	for _ in range(t):
		(l, r, m) = map(int, input().split())
		maxmult = m + (r - l)
		for a in range(l, r + 1):
			found = 0
			bottom = max(m + l - r, a)
			if bottom % a == 0:
				minmult = bottom
			else:
				minmult = (bottom // a + 1) * a
			for mult in range(minmult, maxmult + 1, a):
				rem = mult - m
				if rem >= 0:
					b = l
					c = l + rem
					if l <= c <= r:
						print(a, b, c)
						found = 1
						break
					b = r
					c = r - rem
					if l <= c <= r:
						print(a, b, c)
						found = 1
						break
				elif rem < 0:
					b = r
					c = r + rem
					if l <= c <= r:
						print(a, b, c)
						found = 1
						break
					b = l
					c = l - rem
					if l <= c <= r:
						print(a, b, c)
						found = 1
						break
			if found:
				break
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


import math
t = int(input())
for _ in range(0, t):
	(l, r, m) = map(int, input().split())
	for a in range(l, r + 1):
		n = math.floor((m + r - l) / a)
		if n > 0 and n * a >= m - (r - l):
			x = m - n * a
			if x > 0:
				b = r
				c = r - x
			else:
				b = l
				c = l - x
			print(a, b, c)
			break


import os, io
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
cases = int(input())
for t in range(cases):
	(l, r, m) = list(map(int, input().split()))
	var = r - l
	ndmax = m + var
	ndmin = m - var
	for a in range(l, r + 1):
		nd = ndmax // a
		v = nd * a
		left = m - v
		if v >= ndmin and v <= ndmax:
			if left >= -var and left < 0:
				print(a, left + r, r)
				break
			elif left >= 0 and left <= var:
				print(a, left + l, l)
				break


t = int(input())
for s in range(t):
	(l, h, m) = map(int, input().split())
	i = l
	flag = -1
	while i <= h:
		r1 = m % i
		r2 = i - m % i
		if m != r1 and h - l >= r1:
			flag = 0
			break
		elif m != -r2 and h - l >= r2:
			flag = 1
			break
		i += 1
	if flag == 0:
		print(i, h, h - r1)
	else:
		print(i, h - r2, h)


t = int(input())
for _ in range(t):
	(l, r, m) = map(int, input().split())
	(a, b, c) = (1, 0, 0)
	for i in range(l, r + 1):
		res1 = m % i
		res2 = m % i - i
		if res1 != m and l - r <= res1 <= r - l:
			a = i
			b = r
			c = r - res1
			break
		if res2 != m and l - r <= res2 <= r - l:
			a = i
			b = l
			c = l - res2
			break
	print(a, b, c)


import sys, math, bisect, random
input = sys.stdin.readline
T = int(input())
for _ in range(T):
	(l, r, m) = map(int, input().split())
	(a, b, c) = (m, m, m)
	if m >= l and m <= r:
		(a, b, c) = (m, l, l)
	elif m < l:
		(a, b, c) = (l, l, 2 * l - m)
	else:
		(a, b, c) = (0, 0, 0)
		diff = r - l
		for i in range(l, r + 1):
			v = m // i
			ad = m - i * v
			if ad <= diff:
				a = i
				b = r
				c = r - ad
				break
			elif i - ad <= diff:
				a = i
				c = r
				b = r - (i - ad)
				break
	print(a, b, c)


for _ in range(int(input())):
	(l, r, m) = map(int, input().split())
	x = r - l
	for i in range(l, r + 1):
		h = m + x
		lo = max(1, m - x)
		n = h // i
		if n * i <= h and n * i >= lo:
			a = i
			n = n * i
			if n >= m:
				b = l
				c = l + n - m
			else:
				b = r
				c = r - m + n
	print(a, b, c, sep=' ')


t = int(input())
for _ in range(t):
	(l, r, m) = [int(x) for x in input().split()]
	flag = 0
	can_do = r - l
	for i in range(l, r + 1):
		if m % i == 0:
			print(i, i, i)
			flag = 1
		else:
			x = m % i
			y = i - x
			z = m // i
			if z > 0:
				if x <= can_do:
					print(i, l + x, l)
					flag = 1
				elif y <= can_do:
					print(i, l, l + y)
					flag = 1
			else:
				x -= 1 * i
				y = -y - 1 * i
				if abs(x) <= can_do:
					if x >= 0:
						print(i, l + x, i)
						flag = 1
					else:
						print(i, l, l + abs(x))
						flag = 1
				elif abs(y) <= can_do:
					if y < 0:
						print(i, l, l + abs(y))
						flag = 1
					else:
						print(i, l + y, l)
						flag = 1
		if flag == 1:
			break


import math
t = int(input())
for i in range(t):
	(l, r, m) = map(int, input().split())
	for j in range(l, r + 1):
		low = math.ceil((m - r + l) / j)
		high = math.floor((m + r - l) / j)
		if low <= high:
			if low >= 1:
				if j * low - m >= 0:
					print(j, l, j * low - m + l)
				else:
					print(j, r, j * low - m + r)
				break
			elif high >= 1:
				if j * high - m >= 0:
					print(j, l, j * high - m + l)
				else:
					print(j, r, j * high - m + r)
				break


a = int(input())
for i in range(a):
	(l, r, m) = map(int, input().split())
	total = m + r - l
	flag = 0
	mini = m + l - r
	maxa = m + r - l
	for i in range(l, r + 1):
		if flag:
			break
		x = total // i
		if mini <= x * i <= maxa:
			for j in range(l, r + 1):
				if l <= x * i - m + j <= r:
					print(i, j, x * i - m + j)
					flag = 1
					break
	if flag:
		continue


t = int(input())
for _ in range(t):
	l1 = [int(x) for x in input().split()]
	(l, r, m) = (l1[0], l1[1], l1[2])
	if l <= m and r >= m:
		print(m, l, l)
	elif l > m:
		while l * 2 - m < l:
			l += 1
		print(l, l, l * 2 - m)
	elif r < m:
		ans = 0
		done = 0
		saviour = 0
		for x in range(l, r + 1):
			if x % m == 0:
				ans = x
				done = 1
				break
			elif m % x <= r - l:
				saviour = x
				break
			elif x - m % x <= r - l:
				ans = x
				break
		if done:
			print(ans, l, l)
		elif saviour:
			print(saviour, l + m % saviour, l)
		else:
			print(ans, l, l + ans - m % ans)


import sys
readline = sys.stdin.readline

def solve():
	(L, R, M) = map(int, readline().split())
	U = max(0, M + L - R)
	V = M + R - L
	for a in range(L, R + 1):
		if V // a - (U - 1) // a > 0:
			an = a * (V // a)
			c_b = an - M
			if c_b < 0:
				b = R
				c = R + c_b
			else:
				c = R
				b = R - c_b
			print(a, b, c)
			return
T = int(readline())
for i in range(T):
	solve()


import sys

def answer(l, r, m):
	d = r - l
	w = 2 * d
	ml = m - d
	mh = m + d
	ans = [0, 0, 0]
	for i in range(l, r + 1):
		rem = mh % i
		res = mh - rem
		if res >= ml:
			ans[0] = i
			offset = m - res
			if offset > 0:
				c = l
				b = l + offset
			else:
				c = r
				b = r + offset
			ans[1] = b
			ans[2] = c
			return ans
	return

def main():
	t = int(sys.stdin.readline())
	while t:
		(l, r, m) = map(int, sys.stdin.readline().split())
		print(*answer(l, r, m))
		t -= 1
	return
main()


def ceil(u, v):
	if u % v == 0:
		return u // v
	else:
		return u // v + 1

def solve():
	(l, r, m) = [int(v) for v in input().split()]
	for il in range(l, r + 1):
		lessn = m // il
		moren = ceil(m, il)
		ltars = m - lessn * il
		gtars = moren * il - m
		if lessn and ltars <= r - l:
			print(il, r, r - ltars)
			return
		if gtars <= r - l:
			print(il, r - gtars, r)
			return
t = int(input())
for _ in range(t):
	solve()


t = int(input())
for _ in range(t):
	(l, r, m) = map(int, input().split())
	for i in range(l, r + 1):
		x = m // i
		if x == 0:
			x = 1
			x = m - i * x
			if abs(x) <= r - l:
				if x < 0:
					b = l
					c = l - x
				else:
					b = l - x
					c = l
				print(i, b, c)
				break
		else:
			c = x
			x = m - i * x
			if x <= r - l:
				print(i, l + x, l)
				break
			x = m - i * (c + 1)
			x = x * -1
			if x <= r - l:
				print(i, l, l + x)
				break


for _ in range(int(input())):
	(l, r, m) = map(int, input().split())
	p = m + r - l
	q = m + l - r
	for i in range(l, r + 1):
		n = p // i
		if n * i < q or n * i > p:
			continue
		val = n * i - m
		if val > 0:
			print(i, l, l + val)
			break
		else:
			print(i, r, r + val)
			break


def solve():
	(l, r, m) = list(map(int, input().split()))
	for a in range(l, r + 1):
		mod = m % a
		if m // a == 0:
			mod -= a
		if mod > r - l:
			mod = mod - a
		if mod < r - l + 1 and mod > l - r - 1:
			if mod < 0:
				print(a, ' ', l, ' ', l - mod)
			else:
				print(a, ' ', l + mod, ' ', l)
			return
tt = int(input())
for i in range(tt):
	solve()


t = int(input())
for i in range(t):
	lrm = list(map(int, input().split()))
	m = lrm[2]
	difference = lrm[1] - lrm[0]
	for k in range(lrm[0], lrm[1] + 1):
		if m % k <= difference:
			b = lrm[1]
			c = b - m % k
			a = k
			if m - (b - c) > 0:
				print(a, b, c)
				break
		if k - m % k <= difference:
			b = lrm[1]
			c = b - (k - m % k)
			a = k
			print(a, c, b)
			break


t = int(input())
for i in range(t):
	(l, r, m) = map(int, input().split())
	maxdiff = r - l
	for i in range(l, r + 1):
		if m % i == 0:
			print(i, l, l)
			break
		elif i - m % i <= maxdiff:
			diff = i - m % i
			print(i, l, l + diff)
			break
		elif m % i <= maxdiff:
			diff = m % i
			print(i, l + diff, l)
			break


for _ in range(int(input())):
	(l, r, m) = map(int, input().split())
	(a, b, c, x) = (0, 0, 0, 0)
	for i in range(l, r + 1):
		if m >= i:
			x = m % i
			y = m % i - i
			if x <= r - l:
				a = i
				c = l
				b = x + c
				break
			elif abs(y) <= r - l:
				a = i
				c = r
				b = c + y
		else:
			x = m - i
			if abs(x) <= r - l:
				a = i
				c = r
				b = c + x
				break
	print(a, b, c)


for _ in range(int(input())):
	(l, r, m) = map(int, input().split())
	(x, y) = (l - r, r - l)
	(a, b, c) = (0, 0, 0)
	temp = l
	while True:
		k = m % l
		if m >= l and (k <= y or k - l >= x):
			a = l
			if k <= y:
				b = temp + m % l
				c = temp
			elif k - l >= x:
				b = temp
				c = temp + abs(k - l)
			break
		elif m < l:
			a = l
			b = temp
			c = abs(k - l) + temp
			break
		else:
			l += 1
	print(a, b, c, sep=' ')


import sys

def input():
	return sys.stdin.readline().rstrip()

def input_split():
	return [int(i) for i in input().split()]
testCases = int(input())
answers = []
for _ in range(testCases):
	(l, r, m) = input_split()
	lex = l - r
	rex = r - l
	for a in range(l, r + 1):
		n = m // a
		rem = m % a
		diff1 = -rem
		diff2 = a - rem
		diff = None
		if lex <= diff1 <= rex and n != 0:
			diff = diff1
		elif lex <= diff2 <= rex:
			diff = diff2
		else:
			continue
		if diff is not None:
			if diff > 0:
				b = l
				c = l + diff
			else:
				c = l
				b = l + -diff
			break
	ans = '{} {} {}'.format(a, b, c)
	answers.append(ans)
print(*answers, sep='\n')


import sys
sys.setrecursionlimit(10 ** 5)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep='\n')

def II():
	return int(sys.stdin.readline())

def MI():
	return map(int, sys.stdin.readline().split())

def LI():
	return list(map(int, sys.stdin.readline().split()))

def LLI(rows_number):
	return [LI() for _ in range(rows_number)]

def SI():
	return sys.stdin.readline()[:-1]
for _ in range(II()):
	(l, r, m) = MI()
	for a in range(l, r + 1):
		(b, c) = (l, r)
		over = (m - b + c) % a
		if over <= 2 * (r - l) and m - b + c - over >= a:
			s = min(over, r - l)
			c -= s
			over -= s
			b += min(over, r - l)
			print(a, b, c)
			break


t = int(input())
for i in range(t):
	(l, r, m) = map(int, input().split())
	for j in range(l, r + 1):
		a = m % j
		b = j - a
		if j <= m and a <= r - l:
			print(j, l + a, l)
			break
		elif b <= r - l:
			print(j, l, l + b)
			break


import sys
import collections

def input():
	return sys.stdin.readline().rstrip()

def split_input():
	return [int(i) for i in input().split()]
tests = int(input())
for _ in range(tests):
	(l, r, m) = split_input()
	for i in range(l, r + 1):
		if m // i > 0 and m % i <= r - l:
			print(i, l + m % i, l)
			break
		if abs(m % i - i) <= r - l:
			print(i, l, l + abs(m % i - i))
			break


for t in range(int(input())):
	(l, r, m) = [int(k) for k in input().split()]
	dif = r - l
	for i in range(r, l - 1, -1):
		mm1 = m % i
		mm2 = i - mm1
		if mm1 <= dif and m >= i:
			print(i, r, r - mm1)
			break
		elif mm2 <= dif:
			print(i, l, l + mm2)
			break


from sys import stdin
input = stdin.readline
for _ in range(int(input())):
	(l, r, m) = map(int, input().split())
	lis = []
	for i in range(l, r + 1):
		if m % i == 0:
			print(i, l, l)
			break
		x = m // i * i
		if x != 0 and abs(m - x) <= r - l:
			if m > x:
				print(i, r, r - (m - x))
			else:
				print(i, l, l + (x - m))
			break
		x = (m // i + 1) * i
		if abs(m - x) <= r - l:
			if m > x:
				print(i, r, r - (m - x))
			else:
				print(i, l, l + (x - m))
			break


for _ in range(int(input())):
	(l, r, m) = map(int, input().split())
	for a in range(l, r + 1):
		minn = m // a
		maxn = 0 - -m // a
		if l - r <= m - minn * a <= r - l and minn > 0:
			m -= minn * a
			for b in range(l, r + 1):
				if -r <= m - b <= -l:
					print(a, b, b - m)
					break
			break
		if l - r <= m - maxn * a <= r - l:
			m -= maxn * a
			for b in range(l, r + 1):
				if -r <= m - b <= -l:
					print(a, b, b - m)
					break
			break


for _ in range(int(input())):
	(l, r, m) = map(int, input().split(' '))
	max_rem = r - l
	a = 0
	pos = -1
	v = 0
	for i in range(l, r + 1):
		if i - m % i <= max_rem:
			a = i
			v = i - m % i
			pos = 1
			break
		if m % i <= max_rem and m - m % i != 0:
			a = i
			v = m % i
			pos = 0
			break
	if pos:
		print(a, l, l + v)
	else:
		print(a, l + v, l)


def solve(l, r, m):
	nmax = (m + r - l) // l
	for i in range(l, r + 1):
		n = (m + r - l) // i
		if n > 0 and n <= nmax and (m - r + l <= n * i <= m + r - l):
			x = m - n * i
			if x > 0:
				L = [i, l + x, l]
			else:
				L = [i, l, l - x]
			return L
t = int(input())
for i in range(0, t):
	lrm = input().split()
	l = int(lrm[0])
	r = int(lrm[1])
	m = int(lrm[2])
	A = solve(l, r, m)
	print(*A)


for _ in range(int(input())):
	(l, r, m) = map(int, input().split())
	gmin = float('Inf')
	num = -1
	output = []
	for i in range(l, r + 1):
		min1 = min(m % i, abs(i - m % i))
		if min1 < gmin:
			num = i
			gmin = min1
	output.append(num)
	if num > m:
		diff = num - m
		output.append(r - diff)
		output.append(r)
	elif num <= m and m % num == gmin:
		diff = m % num
		output.append(r)
		output.append(r - diff)
	else:
		diff = abs(num - m % num)
		output.append(l)
		output.append(l + diff)
	for i in output:
		print(i, end=' ')
	print()


import os
import sys, math
from io import BytesIO, IOBase

def main():
	t = int(input())
	for case in range(t):
		(l, r, m) = list(map(int, input().split()))
		for a in range(l, r + 1):
			if m % a == 0:
				print(a, l, l)
				break
			else:
				bada = a * (m // a + 1)
				chota = a * (m // a)
				if bada - m <= r - l:
					print(a, l, l + (bada - m))
					break
				if m - chota <= r - l:
					print(a, l + (m - chota), l)
					break
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


import sys
input = sys.stdin.readline
T = int(input())
for testcase in range(T):
	(l, r, m) = map(int, input().split())
	mi = m - (r - l)
	ma = m + (r - l)
	for A in range(l, r + 1):
		P = mi // A * A
		if mi % A != 0:
			P += A
		if P == 0:
			P += A
		if P <= ma:
			a = A
			p = P
			break
	d = m - p
	if d >= 0:
		print(a, l + d, l)
	else:
		print(a, r + d, r)


import math
t = int(input())
for h in range(t):
	lrm = list(map(int, input().split()))
	l = lrm[0]
	r = lrm[1]
	m = lrm[2]
	a = l
	while abs(m - a * math.floor(m / a)) > abs(r - l) and abs(m - a * math.ceil(m / a)) > abs(r - l) and (math.floor(m / a) > 0):
		a = a + 1
	if abs(m - a * math.ceil(m / a)) < abs(r - l) or abs(m - a * math.ceil(m / a)) == abs(r - l):
		n = math.ceil(m / a)
	else:
		n = math.floor(m / a)
	if m - a * n > 0:
		b = r
		c = r - m + n * a
	elif m - a * n < 0:
		b = l
		c = l - m + n * a
	else:
		b = l
		c = l
	print(a, b, c)


t = input()
t = int(t)

def solve(l, r, m):
	if l == r:
		return list(map(str, [l, l, l]))
	for x in range(l, r + 1):
		n = (m + r - l) // x
		if n >= 1:
			a = x
			k = n * a - m
			if k < l - r:
				continue
			elif k <= 0:
				b = l - k
				c = l
			else:
				b = l
				c = l + k
			return list(map(str, [a, b, c]))
for i in range(t):
	(l, r, m) = map(int, input().split())
	ans = solve(l, r, m)
	print(' '.join(ans))


t = int(input())
for t in range(t):
	(x, y, z) = map(int, input().split())
	d = y - x
	for i in range(x, y + 1):
		v = z % i
		if v <= d and z >= i:
			print(i, x + v, x)
			break
		elif v >= i - d:
			print(i, x, x + i - v)
			break


def fact(x):
	if x == 0:
		return 1
	else:
		return x * fact(x - 1)

def lower_bound(li, num):
	answer = len(li) - 1
	start = 0
	end = len(li) - 1
	while start <= end:
		middle = (end + start) // 2
		if li[middle] >= num:
			answer = middle
			end = middle - 1
		else:
			start = middle + 1
	return answer

def upper_bound(li, num):
	answer = -1
	start = 0
	end = len(li) - 1
	while start <= end:
		middle = (end + start) // 2
		if li[middle] <= num:
			answer = middle
			start = middle + 1
		else:
			end = middle - 1
	return answer

def abs(x):
	return x if x >= 0 else -x

def binary_search(li, val, lb, ub):
	ans = 0
	while lb <= ub:
		mid = (lb + ub) // 2
		if li[mid] > val:
			ub = mid - 1
		elif val > li[mid]:
			lb = mid + 1
		else:
			ans = 1
			break
	return ans

def sieve_of_eratosthenes(n):
	ans = []
	arr = [1] * (n + 1)
	(arr[0], arr[1], i) = (0, 0, 2)
	while i * i <= n:
		if arr[i] == 1:
			j = i + i
			while j <= n:
				arr[j] = 0
				j += i
		i += 1
	for k in range(n):
		if arr[k] == 1:
			ans.append(k)
	return ans

def nc2(x):
	if x == 1:
		return 0
	else:
		return x * (x - 1) // 2

def kadane(x):
	sum_so_far = 0
	current_sum = 0
	for i in x:
		current_sum += i
		if current_sum < 0:
			current_sum = 0
		else:
			sum_so_far = max(sum_so_far, current_sum)
	return sum_so_far

def mex(li):
	check = [0] * 1001
	for i in li:
		check[i] += 1
	for i in range(len(check)):
		if check[i] == 0:
			return i

def sumdigits(n):
	ans = 0
	while n != 0:
		ans += n % 10
		n //= 10
	return ans

def product(li):
	ans = 1
	for i in li:
		ans *= i
	return ans

def maxpower(n, k):
	cnt = 0
	while n > 1:
		cnt += 1
		n //= k
	return cnt
from math import *
from collections import deque
max_steps = 100005
for _ in range(int(input())):
	(l, r, m) = map(int, input().split())
	for i in range(l, r + 1):
		quo1 = floor(m / i)
		quo2 = ceil(m / i)
		if l + m % i <= r and quo1 > 0:
			a = i
			b = l + m % i
			c = l
			print(a, b, c)
			break
		elif r - (i - m % i) >= l and quo2 > 0:
			a = i
			b = r - (i - m % i)
			c = r
			print(a, b, c)
			break


for _ in range(int(input())):
	(l, r, m) = map(int, input().split())
	diff = r - l
	(a, b, c) = (0, 0, 0)
	if m == l:
		print(l, l, l)
	elif m == r:
		print(r, r, r)
	elif m > l:
		for i in range(l, r + 1):
			if m % i <= diff:
				a = i
				c = l
				b = c + m % i
				break
			elif (m // i + 1) * i - m <= diff:
				v = (m // i + 1) * i - m
				a = i
				b = l
				c = l + v
				break
		print(a, b, c)
	else:
		v = l - m
		a = l
		c = l + v
		b = l
		print(a, b, c)


def solve(l, r, m):
	diff = r - l
	c = l
	for i in range(l, r + 1):
		a = i
		n = (m + r - l) // a
		if abs(m - n * a) <= r - l:
			b = abs(m - n * a)
			break
	if m - n * a > 0:
		print(a, l + b, c)
	else:
		print(a, c, l + b)
t = int(input())
for _ in range(t):
	(l, r, m) = map(int, input().split())
	solve(l, r, m)


from sys import stdin, stdout
import math
from collections import Counter, deque
L = lambda : list(map(int, stdin.readline().strip().split()))
M = lambda : map(int, stdin.readline().strip().split())
I = lambda : int(stdin.readline().strip())
IN = lambda : stdin.readline().strip()
C = lambda : stdin.readline().strip().split()
mod = 1000000007

def s(a):
	print(''.join(list(map(str, a))))

def solve():
	(l, r, m) = M()
	for i in range(l, r + 1):
		rem = m % i
		if rem <= r - l and rem != m:
			print(i, l + rem, l)
			return
		if rem >= i - (r - l):
			print(i, l, l + (i - rem))
			return
for _ in range(I()):
	solve()


import sys
import math
t = int(sys.stdin.readline())
for _ in range(t):
	(l, r, m) = map(int, sys.stdin.readline().split())
	left = l - r
	right = r - l
	z = True
	for i in range(l, r + 1):
		low = math.floor(m / i)
		high = math.ceil(m / i)
		dif1 = m - low * i
		if abs(dif1) <= abs(l - r) and low != 0:
			if dif1 > 0:
				print(i, l + abs(dif1), l)
			else:
				print(i, r - abs(dif1), r)
			z = False
			break
		dif2 = m - high * i
		if abs(dif2) <= abs(l - r) and high != 0:
			if dif2 > 0:
				print(i, l + abs(dif2), l)
			else:
				print(i, r - abs(dif2), r)
			z = False
			break


from collections import defaultdict, Counter
from math import log, ceil, floor

def check(a, b, c, m):
	print((m + c - b) % a)

def solve():
	(l, r, m) = list(map(int, input().split()))
	d = r - l
	if m >= l:
		for i in range(l, r + 1):
			x = m % i
			if x <= d:
				a = i
				b = r
				c = r - x
				break
			else:
				d_ = (m // i + 1) * i - m
				if d_ <= d:
					a = i
					b = l
					c = l + d_
					break
		print(a, b, c)
	else:
		d = l - m
		print(l, l, l + d)
t = 1
t = int(input())
for _ in range(t):
	solve()


import sys
inpy = [int(x) for x in sys.stdin.read().split()]
t = inpy[0]
index = 1
for _ in range(t):
	(l, r, m) = inpy[index:index + 3]
	index += 3
	for i in range(l, r + 1):
		rest = m % i
		if rest <= r - l and m // i > 0:
			print(i, l + rest, l)
			break
		elif i - rest <= r - l:
			print(i, l, l + i - rest)
			break


for _ in range(int(input())):
	(l, r, m) = map(int, input().split())
	d = r - l
	for a in range(l, r + 1):
		n = (m + d) // a
		td = m - n * a
		if abs(td) > d:
			continue
		b = l
		c = l
		if td > 0:
			b += td
		else:
			c -= td
		if n > 0:
			print(a, b, c)
			break


for t in range(int(input())):
	(l, r, m) = [int(x) for x in input().strip().split()]
	d = r - l
	for i in range(l, r + 1):
		v = m % i
		if v <= d and m >= i:
			print(i, l + v, l)
			break
		elif v >= i - d:
			print(i, l, l + i - v)
			break


t = int(input())
for _ in range(t):
	(l, r, m) = map(int, input().split())
	a = 0
	for i in range(l, r + 1):
		if m + l - r <= (m + r - l) // i * i <= m + r - l:
			a = i
			break
	n = (m + r - l) // a
	ans = -m + n * a
	if ans >= 0:
		c = r
		b = c - ans
	else:
		c = l
		b = c - ans
	print(a, b, c)


from sys import stdin, stdout
for _ in range(int(stdin.readline())):
	(l, r, m) = list(map(int, stdin.readline().split()))
	for a in range(l, r + 1):
		n = m // a
		diff = m - n * a
		if n != 0 and l + diff <= r:
			print(a, l + diff, l)
			break
		n += 1
		diff = n * a - m
		if l + diff <= r:
			print(a, l, l + diff)
			break


import math
t = int(input())
p = 0
a = 0
while t:
	t -= 1
	(l, r, m) = map(int, input().split())
	mxd = r - l
	if m < l:
		pr = m - l
		c = r
		b = c + pr
		a = l
	elif m == l:
		a = l
		b = l
		c = l
	else:
		for i in range(r, l - 1, -1):
			n = math.floor(m / i)
			n1 = math.ceil(m / i)
			f1 = abs(n * i - m)
			f2 = abs(n1 * i - m)
			re = min(f1, f2)
			if re <= mxd:
				if re == f1:
					p = n
				else:
					p = n1
				a = i
				break
		pr = m - a * p
		if pr > 0:
			c = l
			b = c + pr
		else:
			c = r
			b = c + pr
	print(a, b, c)


import sys, math, cmath, time
start_time = time.time()

def solve():
	(l, r, m) = invr()
	for i in range(l, r + 1):
		if m < l:
			print(l, l, l + l - m)
			break
		q = m % i
		w = 0
		if q != 0:
			w = m - (m // i + 1) * i
		if q < -w:
			if q <= r - l:
				print(i, l + q, l)
				break
		elif -w <= r - l:
			print(i, r + w, r)
			break

def main():
	global tt
	if not ONLINE_JUDGE:
		sys.stdin = open('input.txt', 'r')
		sys.stdout = open('output.txt', 'w')
	t = 1
	t = inp()
	for tt in range(t):
		solve()
	if not ONLINE_JUDGE:
		print('Time Elapsed :', time.time() - start_time, 'seconds')
		sys.stdout.close()

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	return input().strip()

def invr():
	return map(int, input().split())

def counter(a):
	q = [0] * max(a)
	for i in range(len(a)):
		q[a[i] - 1] = q[a[i] - 1] + 1
	return q

def counter_elements(a):
	q = dict()
	for i in range(len(a)):
		if a[i] not in q:
			q[a[i]] = 0
		q[a[i]] = q[a[i]] + 1
	return q

def string_counter(a):
	q = [0] * 26
	for i in range(len(a)):
		q[ord(a[i]) - 97] = (q[ord(a[i]) - 97], 1)
	return q

def factors(n):
	q = []
	for i in range(1, int(n ** 0.5) + 1):
		if n % i == 0:
			q.append(i)
			q.append(n // i)
	return list(sorted(list(set(q))))

def prime_factors(n):
	q = []
	while n % 2 == 0:
		q.append(2)
		n = n // 2
	for i in range(3, int(n ** 0.5) + 1, 2):
		while n % i == 0:
			q.append(i)
			n = n // i
	if n > 2:
		q.append(n)
	return list(sorted(q))

def transpose(a):
	(n, m) = (len(a), len(a[0]))
	b = [[0] * n for i in range(m)]
	for i in range(m):
		for j in range(n):
			b[i][j] = a[j][i]
	return b
ONLINE_JUDGE = __debug__
if ONLINE_JUDGE:
	input = sys.stdin.readline
main()


from sys import stdin, stdout
import math
test = int(stdin.readline())
for _ in range(test):
	(l, r, m) = map(int, stdin.readline().split())
	for i in range(l, r + 1):
		mod = m % i
		diff = i * math.ceil(m / i) - m
		if diff <= r - l:
			ans = [i, l, l + diff]
			break
		if mod <= r - l:
			ans = [i, l + mod, l]
			break
	print(*ans)


from math import ceil
t = int(input())
for _ in range(t):
	(l, r, m) = map(int, input().split())
	x = r - l
	for a in range(l, r + 1):
		n = ceil((m - x) / a) + int(ceil((m - x) / a) == 0)
		if n > 0:
			if abs(m - n * a) <= r - l:
				b = l
				c = int(a * n + b - m)
				if l <= c <= r:
					print(a, b, c)
					break
				b = r
				c = int(a * n + b - m)
				if l <= c <= r:
					print(a, b, c)
					break


t = int(input())
while t:
	t -= 1
	(l, r, m) = map(int, input().split())
	R = m + (r - l)
	L = max(m + (l - r), l)
	for i in range(l, r + 1):
		if R - R % i >= L:
			ans = R - R % i
			c = l + max(0, ans - m)
			b = l + max(0, m - ans)
			print(i, b, c)
			break


import math as mt
import sys, string
input = sys.stdin.readline
L = lambda : list(map(int, input().split()))
Ls = lambda : list(input().split())
M = lambda : map(int, input().split())
I = lambda : int(input())
from collections import defaultdict
t = I()
for _ in range(t):
	(l, r, m) = M()
	for i in range(l, r + 1):
		if m % i == 0:
			print(i, i, i)
			break
		else:
			if m % i <= r - l:
				if (m - m % i) // i > 0:
					print(i, l + m % i, l)
					break
			if i - m % i <= r - l:
				print(i, l, l + (i - m % i))
				break


from sys import stdin
for _ in range(int(stdin.readline())):
	(l, r, m) = map(int, stdin.readline().split())
	maxdif = r - l
	a = 0
	b = 0
	c = l
	if l > m:
		diff = l - m
		a = l
		c = r
		b = c - diff
		print(a, b, c)
		continue
	for i in range(l, r + 1):
		diff = m % i
		if diff <= maxdif:
			a = i
			b = c + diff
			break
		elif diff >= i - maxdif:
			a = i
			c = r
			b = c - (i - diff)
			break
	print(a, b, c)


def solve():
	(l, r, m) = map(int, input().split())
	a = l
	n = (m - (r - l) + a - 1) // a
	for x in range(l, r + 1):
		if (m - (r - l) + x - 1) // x > 0:
			a = x
			n = (m - (r - l) + x - 1) // x
			if l - r <= m - n * a <= r - l:
				break
		if (m - l + r) // x > 0:
			a = x
			n = (m - l + r) // x
			if l - r <= m - n * a <= r - l:
				break
	e = m - a * n
	for b in range(l, r + 1):
		if l <= b - e and b - e <= r:
			c = b - e
			return ' '.join(map(str, [a, b, c]))

def main():
	T = int(input())
	ANS = [solve() for _ in range(T)]
	print('\n'.join(map(str, ANS)))
main()


import sys

def rs():
	return sys.stdin.readline().rstrip()

def ri():
	return int(sys.stdin.readline())

def ria():
	return list(map(int, sys.stdin.readline().split()))

def ws(s):
	sys.stdout.write(s)
	sys.stdout.write('\n')

def wi(n):
	sys.stdout.write(str(n))
	sys.stdout.write('\n')

def wia(a, sep=' '):
	sys.stdout.write(sep.join([str(x) for x in a]))
	sys.stdout.write('\n')

def solve(l, r, m):
	for a in range(l, r + 1):
		n = max((m + l - r + a - 1) // a, 1)
		if n <= (m + r - l) // a:
			s = n * a - m
			if s >= 0:
				c = r
				b = r - s
			else:
				c = l
				b = l - s
			if l <= b <= r:
				return [a, b, c]

def main():
	for _ in range(ri()):
		(l, r, m) = ria()
		wia(solve(l, r, m))
main()


t = int(input())
for i in range(t):
	(l, r, m) = list(map(int, input().split()))
	b = l
	c = l
	for j in range(l, r + 1):
		if m % j <= r - l or j - m % j <= r - l:
			a = j
			if m >= j:
				if m % j <= r - l:
					b += m % j
				else:
					c += j - m % j
				break
			else:
				if m % j <= r - l:
					c += j - m % j
				else:
					c += m % j
				break
	print(a, b, c)


import math
t = int(input())
for _ in range(t):
	(l, r, m) = map(int, input().split())
	(a, b, c) = (0, 0, 0)
	for i in range(l, r + 1):
		add = math.ceil(m / i) * i - m
		sub = m - m // i * i
		if add <= r - l:
			a = i
			b = l
			c = l + add
			break
		if sub <= r - l:
			a = i
			c = l
			b = l + sub
			break
	print(a, b, c)


t = int(input())
for case in range(t):
	(l, r, m) = map(int, input().split())
	ans = []
	for a in range(l, r + 1):
		mx = (m + r - l) // a
		mn = max(1, (m - r + l + a - 1) // a)
		if mx - mn >= 0:
			n = mx
			if m - n * a > 0:
				c = l
				b = m - n * a + c
			else:
				b = l
				c = n * a - m + b
			ans = [a, b, c]
	print(*ans)


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	(l, r, m) = map(int, input().split())
	diff = r - l
	for a in range(l, r + 1):
		val = (m + diff) // a * a
		if m - diff <= val <= m + diff:
			break
	if val < m:
		b = r
		c = r - (m - val)
	else:
		c = r
		b = r - (val - m)
	print(a, b, c)


import os
import sys
from io import BytesIO, IOBase
import threading
from bisect import bisect_right
from math import gcd, log
from collections import Counter

def main():
	(l, r, m) = map(int, input().split())
	bf = r - l
	for i in range(l, r + 1):
		t1 = i * (m // i)
		t2 = i * (1 + m // i)
		if t2 - m <= bf:
			print(i, l, l + t2 - m)
			break
		if m - t1 <= bf:
			print(i, l + m - t1, l)
			break
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
for _ in range(int(input())):
	main()


import sys
import math
import itertools
import functools
import collections
import operator
import fileinput
import copy
ORDA = 97

def ii():
	return int(input())

def mi():
	return map(int, input().split())

def li():
	return [int(i) for i in input().split()]

def lcm(a, b):
	return abs(a * b) // math.gcd(a, b)

def revn(n):
	return str(n)[::-1]

def dd():
	return collections.defaultdict(int)

def ddl():
	return collections.defaultdict(list)

def sieve(n):
	if n < 2:
		return list()
	prime = [True for _ in range(n + 1)]
	p = 3
	while p * p <= n:
		if prime[p]:
			for i in range(p * 2, n + 1, p):
				prime[i] = False
		p += 2
	r = [2]
	for p in range(3, n + 1, 2):
		if prime[p]:
			r.append(p)
	return r

def divs(n, start=2):
	r = []
	for i in range(start, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n / i == i:
				r.append(i)
			else:
				r.extend([i, n // i])
	return r

def divn(n, primes):
	divs_number = 1
	for i in primes:
		if n == 1:
			return divs_number
		t = 1
		while n % i == 0:
			t += 1
			n //= i
		divs_number *= t

def prime(n):
	if n == 2:
		return True
	if n % 2 == 0 or n <= 1:
		return False
	sqr = int(math.sqrt(n)) + 1
	for d in range(3, sqr, 2):
		if n % d == 0:
			return False
	return True

def convn(number, base):
	new_number = 0
	while number > 0:
		new_number += number % base
		number //= base
	return new_number

def cdiv(n, k):
	return n // k + (n % k != 0)

def ispal(s):
	for i in range(len(s) // 2 + 1):
		if s[i] != s[-i - 1]:
			return False
	return True

def main():
	for _ in range(ii()):
		(l, r, m) = mi()
		x = l - r
		a = l
		while True:
			if (m - x) % a == 0:
				break
			if x + (m - x) % a <= r - l and x + (m - x) % a < a:
				x += (m - x) % a
			else:
				a += 1
		for c in range(l, r + 1):
			b = x + c
			if b <= r and b >= l:
				break
		print(a, b, c)
main()


def solve(l, r, m):
	mbc_min = m - (r - l)
	mbc_max = m + (r - l)
	for a in range(l, r + 1):
		n = m // a
		if n > 0 and mbc_min <= n * a <= mbc_max:
			bc = m - n * a
			if bc >= 0:
				(b, c) = (l + bc, l)
			elif bc < 0:
				(b, c) = (l, l - bc)
			return (a, b, c)
		elif mbc_min <= (n + 1) * a <= mbc_max:
			bc = m - (n + 1) * a
			if bc >= 0:
				(b, c) = (l + bc, l)
			elif bc < 0:
				(b, c) = (l, l - bc)
			return (a, b, c)
t = int(input())
for _ in range(t):
	(l, r, m) = map(int, input().split())
	print(*solve(l, r, m))


tc = int(input())
for _ in range(tc):
	(l, r, m) = map(int, input().split())
	for a in range(l, r + 1):
		n = m // a
		rem = 0
		if n <= 0:
			n = 1
			m -= a
			(b, c) = (r + m, r)
		elif abs(m % a) < abs(a - m % a):
			(b, c) = (l + m % a, l)
		else:
			(b, c) = (l, l + a - m % a)
		if b <= r and b >= l and (c <= r) and (c >= l):
			print(a, b, c)
			break


import sys
input = sys.stdin.readline

def main():
	t = int(input())
	for _ in range(t):
		(L, R, M) = [int(x) for x in input().split()]
		for i in range(L, R + 1):
			if M - R + L <= -(-(M - R + L) // i) * i <= M + R - L:
				a = i
				n = -(-(M - R + L) // i)
				if n <= 0:
					n = 1
					if M - R + L <= n * a <= M + R - L:
						pass
					else:
						continue
				cminusb = a * n - M
				if abs(cminusb) <= R - L:
					if cminusb >= 0:
						c = R
						b = R - cminusb
					else:
						c = R + cminusb
						b = R
					print(a, b, c)
					break
				else:
					continue
main()


import sys
input = sys.stdin.readline
import heapq
import copy
import math
import decimal

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def insr2():
	s = input()
	return s[:len(s) - 1]

def invr():
	return map(int, input().split())

def pr_list(a):
	print(*a, sep=' ')

def main():
	tests = inp()
	mod = 1000000007
	limit = 10 ** 18
	ans = 0
	stack = []
	hashm = {}
	arr = []
	heapq.heapify(arr)
	for test in range(tests):
		[l, r, m] = inlt()
		flag = 1
		low = m - (r - l)
		high = m + (r - l)
		for a in range(l, r + 1):
			n = (m + r - l) // a
			if n > 0 and n * a >= low and (n * a <= high):
				k = m - n * a
				if k > 0:
					b = l + k
					c = l
				else:
					b = l
					c = l - k
				pr_list([a, b, c])
				break
main()


for i in range(int(input())):
	(l, r, m) = list(map(int, input().split()))
	co = r - l
	for i in range(l, r + 1):
		k = m % i
		if m >= i and co >= k:
			print('%d %d %d' % (i, l + k, l))
			break
		k = i - k
		if m >= i and co >= k:
			print('%d %d %d' % (i, r - k, r))
			break
		kn = i - m
		if m < i and co >= kn:
			print('%d %d %d' % (i, i, i + kn))
			break


import sys
import math
from math import factorial, inf, gcd, sqrt
from heapq import *
from functools import *
from itertools import *
from collections import *
from typing import *
from bisect import *
import random
sys.setrecursionlimit(10 ** 5)

def rarray():
	return [int(i) for i in input().split()]
t = 1
t = int(input())
for ii in range(t):
	(l, r, m) = rarray()
	for i in range(l, r + 1):
		t = (m + i - 1) // i * i
		if m <= t <= m + r - l:
			print(i, m - t + r, r)
			break
		t = m // i * i
		if m + l - r <= t <= m:
			print(i, m - t + l, l)
			break


T = int(input())
for kse in range(T):
	(l, r, m) = map(int, input().split())
	for i in range(l, r + 1):
		tmp = m % i
		a = i
		c = l
		b = c + tmp
		if b <= r and m // i != 0:
			print(a, b, c)
			break
		tmp = i - m % i
		a = i
		b = l
		c = b + tmp
		if c <= r:
			print(a, b, c)
			break


def val(n, value):
	global a, b, c, m, l
	a = value
	diff = m - a * n
	if diff > 0:
		(b, c) = (l + abs(diff), l)
	else:
		(b, c) = (l, l + abs(diff))
for _ in range(int(input())):
	(l, r, m) = map(int, input().split())
	maxDiff = r - l
	(low, high) = (m - maxDiff, m + maxDiff)
	(a, b, c) = (0, 0, 0)
	for i in range(l, r + 1):
		if low % i == 0 and low // i != 0:
			(a, b, c) = (i, r, l)
			break
		if high % i == 0:
			(a, b, c) = (i, l, r)
			break
		if low // i != high // i:
			val(high // i, i)
			break
	print(a, b, c)


import sys, math
t = int(input())
for _ in range(t):
	(l, r, m) = map(int, input().split())
	diff = r - l
	a = b = c = -1
	for i in range(l, r + 1):
		x = m % i
		if x == 0:
			a = b = c = i
			break
		elif i - x <= diff:
			a = i
			c = r
			b = r - (i - x)
			break
		elif x <= diff:
			a = i
			b = r
			c = r - x
			break
	print(a, b, c)


import math, sys, bisect, heapq
from collections import defaultdict, Counter, deque
from itertools import groupby, accumulate
input = iter(sys.stdin.buffer.read().decode().splitlines()).__next__
ilele = lambda : map(int, input().split())
alele = lambda : list(map(int, input().split()))

def Y(c):
	print(['NO', 'YES'][c])

def y(c):
	print(['no', 'yes'][c])

def Yy(c):
	print(['No', 'Yes'][c])
for _ in range(int(input())):
	(l, r, m) = ilele()
	(f1, f2) = (0, 0)
	for i in range(l, r + 1):
		t = m % i
		p = i - t
		if l + t <= r and m - t > 0:
			f1 = 1
			break
		if l + p <= r:
			f2 = 1
			break
	if f1 == 1:
		print(i, l + t, l)
	elif f2 == 1:
		print(i, l, l + p)


from collections import *
import sys

def ri():
	return int(input())

def rl():
	return list(map(int, input().split()))
t = ri()
for _ in range(t):
	(l, r, m) = rl()
	delta = r - l
	for a in range(l, r + 1):
		n = (m + delta) // a
		if n > 0 and n >= (m - delta) / a:
			diff = m - n * a
			if diff >= 0:
				b = r
				c = b - diff
			else:
				b = l
				c = b - diff
			break
	print(a, b, c)


def modinv(n, p):
	return pow(n, p - 2, p)

def possible(a, b, c, l, r, m):
	if (l <= a <= r and l <= b <= r and (l <= c <= r)) and (m + c - b) // a > 0:
		return True
	else:
		return False

def main():
	for case in range(int(input())):
		(l, r, m) = [int(x) for x in input().split()]
		for a in range(l, r + 1):
			x = m % a
			y = a - m % a
			b = r
			c = r - x
			if possible(a, b, c, l, r, m):
				print(a, b, c)
				break
			c = r
			b = r - y
			if possible(a, b, c, l, r, m):
				print(a, b, c)
				break
py2 = round(0.5)
if py2:
	from future_builtins import ascii, filter, hex, map, oct, zip
	range = xrange
import os, sys
from io import IOBase, BytesIO
BUFSIZE = 8192

class FastIO(BytesIO):
	newlines = 0

	def __init__(self, file):
		self._file = file
		self._fd = file.fileno()
		self.writable = 'x' in file.mode or 'w' in file.mode
		self.write = super(FastIO, self).write if self.writable else None

	def _fill(self):
		s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
		self.seek((self.tell(), self.seek(0, 2), super(FastIO, self).write(s))[0])
		return s

	def read(self):
		while self._fill():
			pass
		return super(FastIO, self).read()

	def readline(self):
		while self.newlines == 0:
			s = self._fill()
			self.newlines = s.count(b'\n') + (not s)
		self.newlines -= 1
		return super(FastIO, self).readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.getvalue())
			(self.truncate(0), self.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		if py2:
			self.write = self.buffer.write
			self.read = self.buffer.read
			self.readline = self.buffer.readline
		else:
			self.write = lambda s: self.buffer.write(s.encode('ascii'))
			self.read = lambda : self.buffer.read().decode('ascii')
			self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


tc = int(input())
for _ in range(tc):
	(l, r, m) = input().split()
	l = int(l)
	r = int(r)
	m = int(m)
	for a in range(l, r + 1):
		rev = False
		k = m % a
		n = m // a
		if n == 0 or a - k <= r - l:
			rev = True
			k = a - k
		if k <= r - l:
			if rev:
				b = r - k
				c = r
			else:
				b = l + k
				c = l
			print(a, b, c)
			break


import sys, os, io

def rs():
	return sys.stdin.readline().rstrip()

def ri():
	return int(sys.stdin.readline())

def ria():
	return list(map(int, sys.stdin.readline().split()))

def ws(s):
	sys.stdout.write(s + '\n')

def wi(n):
	sys.stdout.write(str(n) + '\n')

def wia(a):
	sys.stdout.write(' '.join([str(x) for x in a]) + '\n')
import math, datetime, functools, itertools, operator
from collections import deque, defaultdict, OrderedDict
import collections

def main():
	starttime = datetime.datetime.now()
	if os.path.exists('input.txt'):
		sys.stdin = open('input.txt', 'r')
		sys.stdout = open('output.txt', 'w')
	zz = 0
	for _ in range(ri()):
		(l, r, m) = ria()
		for i in range(l, r + 1):
			z = min(m % i, i - m % i)
			if z <= r - l:
				e = m // i
				a = i
				if e != 0:
					if m - e * i != z:
						na = (e + 1) * i
						b = l
						c = l + z
					else:
						na = e * i
						b = l + z
						c = l
					if na + b - c == m and na != 0:
						print(a, b, c)
						break
					else:
						continue
				elif 2 * l - i == m:
					print(l, l, i)
					break
	endtime = datetime.datetime.now()
	time = (endtime - starttime).total_seconds() * 1000
	if os.path.exists('input.txt'):
		print('Time:', time, 'ms')

class FastReader(io.IOBase):
	newlines = 0

	def __init__(self, fd, chunk_size=1024 * 8):
		self._fd = fd
		self._chunk_size = chunk_size
		self.buffer = io.BytesIO()

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, self._chunk_size))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self, size=-1):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, self._chunk_size if size == -1 else size))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

class FastWriter(io.IOBase):

	def __init__(self, fd):
		self._fd = fd
		self.buffer = io.BytesIO()
		self.write = self.buffer.write

	def flush(self):
		os.write(self._fd, self.buffer.getvalue())
		(self.buffer.truncate(0), self.buffer.seek(0))

class FastStdin(io.IOBase):

	def __init__(self, fd=0):
		self.buffer = FastReader(fd)
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

class FastStdout(io.IOBase):

	def __init__(self, fd=1):
		self.buffer = FastWriter(fd)
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.flush = self.buffer.flush
sys.stdin = FastStdin()
sys.stdout = FastStdout()
main()


T = int(input())
for _ in range(T):
	(l, r, m) = input().split(' ')
	l = int(l)
	r = int(r)
	m = int(m)
	for i in range(l, r + 1):
		if m % i <= r - l and i <= m:
			print(i, l + m % i, l)
			break
		if i - m % i <= r - l:
			print(i, l, l + (i - m % i))
			break


def resolve(l, r, bmc):
	if abs(bmc) > r - l:
		return (-1, -1)
	(b, c) = (l, l + abs(bmc))
	if bmc > 0:
		(b, c) = (c, b)
	return (b, c)

def solve():
	(l, r, m) = map(int, input().split())
	for a in range(l, r + 1):
		for n in range(m // a - 12, m // a + 13):
			if n <= 0:
				continue
			bmc = m - n * a
			(b, c) = resolve(l, r, bmc)
			if l <= b <= r and l <= c <= r:
				print(a, b, c)
				return
t = int(input())
for _ in range(t):
	solve()


t = int(input())
while t:
	t += -1
	(L, R, m) = map(int, input().split())
	for l in range(L, R + 1):
		t1 = m // l
		t2 = l * (t1 + 1)
		t1 = l * t1
		t3 = m - t1
		t4 = m - t2
		if t1 == 0:
			if L <= l - t4 <= R:
				print(l, l, l - t4)
				break
		else:
			if abs(t3) > abs(t4):
				if L <= R + t4 <= R:
					print(l, R + t4, R)
					break
			if abs(t3) <= abs(t4):
				if L <= R - t3 <= R:
					print(l, R, R - t3)
					break


t = int(input())
while t:
	(l, r, m) = map(int, input().split())
	if m < l:
		n = l - m
		b = l
		c = l + n
		a = l
		print(a, b, c)
		t -= 1
		continue
	for a in range(l, r + 1):
		if m % a < a - m % a:
			c = l
			b = l + m % a
			if r < b:
				continue
			print(a, b, c)
			break
		else:
			b = l
			c = l + (a - m % a)
			if r < c:
				continue
			print(a, b, c)
			break
	t -= 1


from sys import stdin, gettrace
if gettrace():
	inputi = input
else:

	def input():
		return next(stdin)[:-1]

	def inputi():
		return stdin.buffer.readline()

def solve():
	(l, r, m) = map(int, inputi().split())
	for a in range(l, r + 1):
		if m // a > 0 and m % a <= r - l:
			b = r
			c = r - m % a
			print(a, b, c)
			return
		if -m % a <= r - l:
			c = r
			b = r - -m % a
			print(a, b, c)
			return

def main():
	t = int(inputi())
	for _ in range(t):
		solve()
main()


t = int(input())
for _ in range(t):
	(l, r, m) = map(int, input().split())
	if l == 1:
		print(1, 1, 1)
	elif m >= l and m <= r:
		print(m, l, l)
	else:
		for i in range(l, r + 1):
			x = m % i
			if x <= r - l and m >= l:
				print(i, l + x, l)
				break
			elif i - x <= r - l:
				print(i, l, l + i - x)
				break


for t in range(int(input())):
	(l, r, m) = [int(k) for k in input().split()]
	dif = r - l
	for i in range(r, l - 1, -1):
		mm1 = m % i
		mm2 = i - mm1
		if m < l:
			print(l, l, l + (l - m))
			break
		if mm1 <= dif or mm2 <= dif:
			if mm1 <= dif:
				print(i, r, r - mm1)
				break
			else:
				print(i, l, l + mm2)
				break


t = int(input())
for _ in range(t):
	(l, r, m) = map(int, input().split())
	for a in range(l, r + 1):
		rem = m % a
		if rem <= r - l and rem != m:
			print(a, l + rem, l)
			break
		if rem >= a - (r - l):
			print(a, l, l + (a - rem))
			break


for _ in range(int(input())):
	(l, r, m) = map(int, input().split())
	min_s = l - r
	max_s = r - l
	a = l
	bc = min_s
	searching = True
	while a <= r:
		if bc < min_s or bc > max_s:
			a += 1
			bc = min_s
			continue
		diff = (m + bc) % a
		if diff == 0:
			if int((m + bc) / a) > 0:
				break
			bc += a
		else:
			bc += a - diff
	b = l
	c = bc + b
	if not l <= c <= r:
		if c < l:
			c = l
		else:
			c = r
		b = c - bc
	print(f'{a} {b} {c}')


T = int(input())
while T:
	(l, r, m) = map(int, input().split())
	beta = r - l
	(a, b, c) = (0, 0, 0)
	for i in range(l, r + 1):
		if a != 0:
			break
		n = max(1, m // i)
		for j in range(2):
			diff = m - (n + j) * i
			if abs(diff) <= beta:
				a = i
				b = l
				c = l
				if diff > 0:
					b += diff
				else:
					c += abs(diff)
				print(a, b, c)
				break
	T -= 1


import math
t = int(input())
while t != 0:
	(l, r, m) = map(int, input().split())
	(a, b, c) = (0, 0, 0)
	for i in range(r, l - 1, -1):
		p = m // i
		if p != 0:
			diff = m - p * i
			if diff <= r - l:
				a = i
				b = r
				c = r - diff
				break
		p = math.ceil(m / i)
		if p != 0:
			diff = p * i - m
			if diff <= r - l:
				a = i
				c = r
				b = r - diff
				break
	print(a, b, c)
	t -= 1


for _ in range(int(input())):
	(l, r, m) = map(int, input().strip().split())
	d = r - l
	for a in range(l, r + 1):
		v = m % a
		if v <= d and m >= a:
			c = l
			b = l + v
			print(a, b, c)
			break
		elif v >= a - d:
			b = l
			c = l + a - v
			print(a, b, c)
			break


from __future__ import print_function
T = int(input())

def solve():
	(L, R, M) = [int(x) for x in input().split()]
	(ML, MR) = (M - (R - L), M + (R - L))
	for a in range(L, R + 1):
		if ML <= a * (MR // a):
			n = MR // a
			b_minus_c = M - a * n
			if b_minus_c >= 0:
				c = L
				b = L + b_minus_c
			else:
				c = R
				b = R + b_minus_c
			assert L <= a <= R
			assert L <= b <= R
			assert L <= c <= R
			assert n * a + b - c == M
			print(*[a, b, c])
			return
	assert False
for _ in range(T):
	solve()


test = int(input())
for _ in range(test):
	(l, r, m) = map(int, input().split())
	for i in range(l, r + 1):
		if m % i <= r - l and m >= l:
			print(i, end=' ')
			print(l + m % i, end=' ')
			print(l)
			break
		elif m < l:
			print(l, end=' ')
			print(l, end=' ')
			print(2 * l - m)
			break
		elif m % i - i < 0 and m % i - i >= l - r:
			print(i, end=' ')
			print(l, end=' ')
			print(l - m % i + i)
			break


import math as ma
t = int(input())
for i in range(t):
	(l, r, m) = list(map(int, input().split()))
	if m % l == 0:
		print(l, l, l)
	else:
		e = 0
		for i in range(l, r + 1):
			a = ma.ceil(m / i) * i - m
			if a <= r - l:
				print(i, l, l + a)
				e = 1
				break
			else:
				a = m - m // i * i
				if a <= r - l:
					print(i, r, r - a)
					e = 1
					break
		if e == 0:
			print(x)


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
testcases = int(input())
for j in range(testcases):
	(l, r, m) = map(int, input().split())
	for s in range(l, r + 1):
		r1 = m % s
		r2 = -m % s
		if s <= m:
			a = s
			b1 = l + r1
			c1 = l
			ans = [a, b1, c1]
			if l <= b1 and b1 <= r:
				print(*ans)
				break
			b2 = l
			c2 = l + r2
			if l <= c2 and c2 <= r:
				ans = [a, b2, c2]
				print(*ans)
				break
		else:
			n = 1
			a = s
			b = l
			c = l + (s - m)
			if l <= c and c <= r:
				ans = [a, b, c]
				print(*ans)
				break
	continue


import sys
import math
import heapq
from collections import defaultdict, deque
from decimal import *

def R():
	return int(input())

def rm():
	return map(int, input().split())

def rl():
	return list(map(int, input().split()))
for _ in range(R()):
	(l, r, m) = rm()
	for i in range(l, r + 1):
		rem = m % i
		if rem != m:
			if r - rem >= l:
				print(i, r, r - rem)
				break
		rem = i - rem
		if r - rem >= l:
			print(i, r - rem, r)
			break


def gap(d, l, r):
	for b in range(l, r + 1):
		c = b - d
		if l <= c <= r:
			return (b, c)
	assert False

def ans(l, r, m):
	for a in range(l, r + 1):
		dist1 = m % a
		if dist1 <= r - l and m - dist1 > 0:
			(b, c) = gap(dist1, l, r)
			return (a, b, c)
		dist2 = a - m % a
		if dist2 <= r - l:
			(b, c) = gap(-dist2, l, r)
			return (a, b, c)
T = int(input())
for _ in range(T):
	(l, r, m) = input().split(' ')
	l = int(l)
	r = int(r)
	m = int(m)
	print(*ans(l, r, m))


tq = int(input())
for _ in range(tq):
	(l, r, m) = map(int, input().split())
	mn = l - r
	mx = r - l
	(b, c) = (0, 0)
	for a in range(l, r + 1):
		d = m % a
		if d >= mn and d <= mx and (m >= a):
			b = l
			c = b - d
			if b < l or c < l or b > r or (c > r):
				b = r
				c = b - d
			if b >= l and c >= l and (b <= r) and (c <= r):
				print(a, b, c)
				break
		d = -1 * (a - d)
		if d >= mn and d <= mx:
			b = l
			c = b - d
			if b < l or c < l or b > r or (c > r):
				b = r
				c = b - d
			if b >= l and c >= l and (b <= r) and (c <= r):
				print(a, b, c)
				break


t = int(input())
while t > 0:
	(l, r, m) = [int(i) for i in input().split()]
	diff = abs(l - r)
	for i in range(l, r + 1):
		rem = m % i
		k = m // i
		if k == 0:
			if rem <= diff:
				if m <= l:
					print(i, l, l + (i - rem))
					break
		else:
			rem1 = 0
			rem1 = i - rem
			if rem1 <= rem and rem1 <= diff:
				print(i, l, l + rem1)
				break
			elif rem <= diff:
				print(i, l + rem, l)
				break
	t -= 1


def findA(l, r, m):
	lower = -(r - l)
	upper = r - l
	if l == 1 and m != 1:
		l += 1
	for i in range(r, l - 1, -1):
		n = 1
		a = i
		b = r - i + l
		while m - n * a >= lower or m - n * b >= lower:
			if m - n * a >= lower and m - n * a <= upper:
				return (a, m - n * a)
			if m - n * b >= lower and m - n * b <= upper:
				return (b, m - n * b)
			n += 1

def solve(l, r, m):
	(a, b_c) = findA(l, r, m)
	if b_c > 0:
		print(a, l + b_c, l)
		return
	elif b_c < 0:
		print(a, r + b_c, r)
		return
	else:
		print(a, l, l)
		return
t = int(input())
for i in range(t):
	(l, r, m) = map(int, input().split())
	solve(l, r, m)


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	(l, r, m) = [int(x) for x in input().split()]
	for a in range(l, r + 1):
		val1 = m % a
		val2 = (m // a + 1) * a - m
		if r - val1 >= l and val1 <= r - l and (m - val1 > 0):
			print(a, r, r - val1)
			break
		elif r - val2 >= l and val2 <= r - 1:
			print(a, r - val2, r)
			break


def getlist():
	return list(map(int, input().split()))

def main():
	T = int(input())
	for _ in range(T):
		(L, R, M) = getlist()
		for a in range(L, R + 1):
			n = int(M // a)
			var = M - n * a
			if n > 0 and var <= R - L:
				c = L
				b = L + var
				print(a, b, c)
				break
			n2 = n + 1
			var = M - n2 * a
			if L - R <= var:
				c = R
				b = R + var
				print(a, b, c)
				break
main()


import sys, io, os, time
from collections import defaultdict
from collections import OrderedDict
from collections import deque
from itertools import combinations
from itertools import permutations
import bisect, math, heapq
alphabet = 'abcdefghijklmnopqrstuvwxyz'
input = sys.stdin.readline
A = 0
B = 0
C = 0

def check(n, a):
	global A
	global B
	global C
	if n == 0:
		return 0
	A = a
	diff = m - n * a
	if abs(diff) > r - l:
		return 0
	if diff > 0:
		C = l
		B = l + diff
	else:
		C = r
		B = r - abs(diff)
	return 1
for ii in range(int(input())):
	(l, r, m) = map(int, input().split())
	A = 0
	B = 0
	C = 0
	for a in range(l, r + 1):
		n = m // a
		if check(n, a):
			print(A, B, C)
			break
		if check(n + 1, a):
			print(A, B, C)
			break


t = int(input())
for j in range(t):
	(l, r, m) = [int(x) for x in input().split()]
	for a in range(l, r + 1):
		if l + m % a <= r and m // a > 0:
			print(str(a) + ' ' + str(l + m % a) + ' ' + str(l))
			break
		elif l + a - m % a <= r:
			print(str(a) + ' ' + str(l) + ' ' + str(l + a - m % a))
			break


import math
for test in range(int(input())):
	(l, r, m) = map(int, input().split())
	tt = r - l
	for a in range(l, r + 1):
		a1 = math.floor(m / a)
		a2 = math.ceil(m / a)
		if m - a1 * a <= tt and a1 > 0:
			print(a, l + m - a1 * a, l)
			break
		elif a2 * a - m <= tt:
			print(a, l, l + a2 * a - m)
			break


import math
num_cases = int(input())
for _ in range(num_cases):
	(l, r, m) = list(map(int, input().strip().split()))
	for i in range(l, r + 1):
		n = max(math.ceil((m - r + l) / i), 1)
		if n * i <= m + r - l:
			diff = n * i - m
			a = i
			if diff >= 0:
				b = l
				c = l + diff
			elif diff < 0:
				c = l
				b = l - diff
			print('%d %d %d' % (a, b, c))
			break


t = int(input())
for _ in range(t):
	(l, r, m) = map(int, input().split())
	d = r - l
	flag = False
	for i in range(l, r + 1):
		if m >= i:
			k = m % i
			if k <= d:
				a = i
				b = l + k
				c = l
				print(a, b, c)
				break
			else:
				k = i - k
				if k <= d:
					a = i
					b = l
					c = l + k
					print(a, b, c)
					break
		else:
			k = i - m
			if k <= d:
				a = i
				b = l
				c = l + k
				print(a, b, c)
				break


for _ in range(int(input())):
	(l, r, m) = map(int, input().split())
	if l == r == m:
		print(l, r, m)
		continue
	for a in range(l, r + 1):
		x = m % a
		y = a - x
		if m > a:
			if x <= r - l:
				print(a, r, r - x)
				break
			elif y <= r - l:
				print(a, r - y, r)
				break
		if m < a:
			print(a, l, l + y)
			break


def solve(lst):
	[l, r, m] = lst
	lb = m - (r - l)
	ub = m - (l - r)
	for a in range(l, r + 1):
		n = ub // a
		if n > 0:
			if n * a >= lb:
				alpha = m - n * a
				if alpha > 0:
					b = r
					c = r - alpha
				else:
					c = r
					b = r + alpha
				break
	print('{} {} {}'.format(a, b, c))
test = int(input())
matrix = []
for _ in range(test):
	lst = list(map(lambda elem: int(elem), input().split(' ')))
	matrix.append(lst)
for lst in matrix:
	solve(lst)


import sys
input = sys.stdin.readline

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())
N = inp()

def test_case(l, r, m):
	max_dif = r - l
	for a in range(l, r + 1):
		pos_dif = m % a
		if pos_dif - max_dif <= 0 and m - max_dif > 0:
			c = l
			b = l + pos_dif
			print(a, b, c)
			return
		if pos_dif + max_dif >= a:
			pos_dif = a - pos_dif
			b = l
			c = l + pos_dif
			print(a, b, c)
			return
input_arr = []
for _ in range(N):
	input_arr.append(invr())
for (l, r, m) in input_arr:
	test_case(l, r, m)


from sys import stdin
input = stdin.readline
t = int(input())
for _ in range(t):
	(l, r, m) = map(int, input().split())
	for x in range(l, r + 1):
		n = (m + r - l) // x
		if m - (r - l) <= x * n <= m + (r - l) and n > 0:
			y = n * x - m
			(b, c) = (0, 0)
			if 0 <= y <= r - l:
				c = r
				b = r - y
			else:
				b = r
				c = y + r
			print(x, b, c)
			break


import io
import os
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline

def solve():
	(l, r, m) = map(int, input().split())
	for i in range(l, r + 1):
		b = m % i
		if 0 <= i - b <= r - l:
			print(i, l, l + (i - b))
			break
		elif 0 <= b <= r - l and m - b != 0:
			print(i, l + b, l)
			break

def main():
	for t in range(int(input())):
		solve()
main()


import sys, copy
tc = int(sys.stdin.readline())
for _ in range(tc):
	(l, r, m) = map(int, sys.stdin.readline().split())
	find = False
	for i in range(l, r + 1):
		if find:
			break
		a = i
		n = max((m - (l - r)) // a, (m - (r - l)) // a)
		if n > 0:
			diff = m - n * a
			if l <= l + diff <= r:
				print(a, l + diff, l)
				find = True
				break
			if l <= r + diff <= r:
				print(a, r + diff, r)
				find = True
				break


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
from math import gcd, ceil

def pre(s):
	n = len(s)
	pi = [0] * n
	for i in range(1, n):
		j = pi[i - 1]
		while j and s[i] != s[j]:
			j = pi[j - 1]
		if s[i] == s[j]:
			j += 1
		pi[i] = j
	return pi

def prod(a):
	ans = 1
	for each in a:
		ans = ans * each
	return ans

def lcm(a, b):
	return a * b // gcd(a, b)

def binary(x, length=16):
	y = bin(x)[2:]
	return y if len(y) >= length else '0' * (length - len(y)) + y

def getc(s):
	c = 0
	for i in range(len(s) - 7, -1, -1):
		st = 'abacaba'
		if s[i:i + 7] == st:
			c += 1
	return c
for _ in range(int(input()) if True else 1):
	(l, r, m) = map(int, input().split())
	found = False
	for a in range(l, r + 1):
		x = (m - l) // a
		for xx in range(x - 10, x + 10):
			if xx == 0:
				continue
			if abs(m - a * xx) <= r - l:
				found = True
				if m - a * xx > 0:
					(b, c) = (l + (m - a * xx), l)
				else:
					(b, c) = (r + (m - a * xx), r)
				if xx * a + b - c == m:
					print(a, b, c)
				elif xx * a + c - b == m:
					print(a, c, b)
				else:
					print('NO')
				break
		if found:
			break
	if not found:
		print('NO')


from math import ceil, floor
for _ in range(int(input())):
	(l, r, m) = map(int, input().split(' '))
	for i in range(l, r + 1):
		cel = ceil(m / i)
		a = cel * i - m
		flo = floor(m / i)
		b = m - flo * i
		if a >= l - r and a <= r - l:
			ans = [i, l, l + a]
			break
		elif b >= l - r and b <= r - l:
			ans = [i, l + b, l]
			break
	for item in ans:
		print(item, end=' ')
	print('')


import sys
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush
from collections import defaultdict as dd, deque, Counter as C
from itertools import combinations as comb, permutations as perm
from bisect import bisect_left as bl, bisect_right as br, bisect
from time import perf_counter
from fractions import Fraction
mod = int(pow(10, 9) + 7)
mod2 = 998244353

def data():
	return sys.stdin.readline().strip()

def out(*var, end='\n'):
	sys.stdout.write(' '.join(map(str, var)) + end)

def L():
	return list(sp())

def sl():
	return list(ssp())

def sp():
	return map(int, data().split())

def ssp():
	return map(str, data().split())

def l1d(n, val=0):
	return [val for i in range(n)]

def l2d(n, m, val=0):
	return [l1d(n, val) for j in range(m)]
try:
	sys.stdin = open('input.txt', 'r')
except:
	pass
t = L()[0]
for _ in range(t):
	(l, r, m) = L()
	lower = max(1, m + l - r)
	upper = m + r - l
	for a in range(l, r + 1):
		if upper // a - lower // a + (lower % a == 0) > 0:
			if lower % a != 0:
				x = lower // a
				lower = a * (x + 1)
			b = r
			c = max(lower + b - m, l)
			b = min(m - lower + c, r)
			c = min(lower + b - m, r)
			b = max(m - lower + c, l)
			break
	print(a, b, c)


t = int(input())
for _ in range(t):
	(l, r, m) = list(map(int, input().split()))
	for i in range(l, r + 1):
		quo = m // i
		rem = m % i
		if rem <= r - l and quo > 0:
			print(i, l + rem, l)
			break
		else:
			quo += 1
			rem = m - quo * i
			if rem < 0 and abs(rem) <= r - l:
				print(i, l, l + abs(rem))
				break


import sys
import math
from decimal import *

def I():
	return int(sys.stdin.readline())

def IL():
	return list(map(int, sys.stdin.readline().strip().split()))

def ILS():
	return list(map(str, sys.stdin.readline().strip().split()))

def solve():
	tt = I()
	for ii in range(tt):
		(l, r, m) = IL()
		(a, b, c, d) = (0, 0, 0, 0)
		for i in range(l, r + 1):
			a = i
			d = m % a
			if d >= l - r and d <= r - l and (d < m):
				break
			d = d - a
			if d >= l - r and d <= r - l and (d < m):
				break
		for i in range(l, r + 1):
			b = i
			c = i - d
			if c >= l and c <= r:
				break
		print(a, b, c)
		pass
solve()


import math
for _ in range(0, int(input())):
	(l, r, m) = map(int, input().strip().split())
	quotient = []
	remainder = []
	quo_m = []
	rem_m = []
	flag5 = 0
	for i in range(0, r - l + 1):
		if i + l > m:
			quotient.append(0)
			remainder.append(m - (i + l))
			quo_m.append(1)
			rem_m.append(m - (i + l) * 1)
		else:
			quotient.append(m // (i + l))
			remainder.append(m % (i + l))
			quo_m.append(int(math.ceil(m / (i + l))))
			rem_m.append(m - (i + l) * int(math.ceil(m / (i + l))))
		if remainder[i] <= r - l and remainder[i] >= -(r - l) and (quotient[i] != 0):
			a = i + l
			if remainder[i] < 0:
				b = r - 1
				c = r
			elif remainder[i] == 0:
				b = r
				c = r
			else:
				b = r
				c = r - remainder[i]
			print(a, b, c)
			break
		if rem_m[i] <= r - l and rem_m[i] >= -(r - l):
			a = i + l
			if rem_m[i] < 0:
				b = r + rem_m[i]
				c = r
			elif rem_m[i] == 0:
				b = r
				c = r
			else:
				b = r
				c = r - 1
			print(a, b, c)
			break


def check(n, a, b, c, m):
	return n * a + b - c == m
for _ in range(int(input())):
	(l, r, m) = map(int, input().split())
	r += 1
	for a in range(l, r):
		rem = m % a
		if r - l > rem and m // a != 0:
			print(a, l + rem, l)
			break
		elif r - l > a - rem:
			print(a, l, l + (a - rem))
			break
	else:
		raise RuntimeError('I failed')


def main():
	t = int(input())
	for i in range(t):
		(l, r, m) = map(int, input().split())
		if l <= m <= r:
			print(m, l, l)
		elif m < l:
			print(l, l, 2 * l - m)
		else:
			ab = r - l
			for i in range(l, r + 1):
				k = m // i
				if m - k * i <= ab:
					print(i, m - k * i + l, l)
					break
				elif (k + 1) * i - m <= ab:
					print(i, l, (k + 1) * i - m + l)
					break
main()


import sys
input = sys.stdin.readline
I = lambda : list(map(int, input().split()))
(k,) = I()
while k:
	k -= 1
	(l, r, m) = I()
	a = l
	flag = 1
	diff = l - r
	while diff <= 0 and flag:
		x = m + diff
		y = m - diff
		if x != 0:
			for i in range(l, r + 1):
				if x % i == 0:
					print(i, l - diff, l)
					flag = 0
					break
		if flag and y != 0:
			for i in range(l, r + 1):
				if y % i == 0:
					print(i, r + diff, r)
					flag = 0
					break
		diff += 1


for _ in range(int(input())):
	(l, r, m) = map(int, input().split())
	for i in range(l, r + 1):
		a = i
		n = m // i
		if abs(n * a - m) <= r - l and n:
			print(a, r, r - abs(n * a - m))
			break
		elif abs(n * a - m + a) <= r - l:
			print(a, l, l + abs(n * a - m + a))
			break


import sys
import bisect as bi
import math
from collections import defaultdict as dd
input = sys.stdin.readline

def cin():
	return map(int, sin().split())

def ain():
	return list(map(int, sin().split()))

def sin():
	return sys.stdin.readline()

def inin():
	return int(input())
for _ in range(inin()):
	(l, r, m) = cin()
	ran = abs(l - r)
	(left, right) = (max(m - ran, 0), m + ran)
	for i in range(l, r + 1):
		lefm = max(0, left - 1) // i
		rigm = right // i
		if lefm == rigm:
			continue
		else:
			dif = (lefm + 1) * i - m
			ans = i
			break
	if dif > 0:
		print(ans, l, l + dif)
	else:
		print(ans, r, r + dif)


import sys
input = sys.stdin.buffer.readline
import os
from math import *
t = int(input())
while t:
	t -= 1
	(l, r, m) = map(int, input().split())
	if m < l:
		print(l, l, l + l - m)
	else:
		for i in range(l, r + 1):
			rem1 = m % i
			rem2 = i - rem1
			if l + rem1 <= r:
				print(i, rem1 + l, l)
				break
			if l + rem2 <= r:
				print(i, l, l + rem2)
				break


import sys
input = lambda : sys.stdin.readline().rstrip()
for _ in range(int(input())):
	(l, r, m) = map(int, input().split())
	v = r - l
	(x, y, z) = (-1, -1, -1)
	for a in range(l, r + 1):
		val = (m // a + 1) * a - m
		val2 = m % a
		if val <= v:
			(x, y, z) = (a, l, l + val)
			break
		if val2 <= v:
			(x, y, z) = (a, l + val2, l)
			break
	print(x, y, z)


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	(l, r, m) = map(int, input().split())
	for a in range(l, r + 1):
		m_mod = m % a
		(b, c) = (r, r - m_mod)
		if l <= c and m > b - c:
			print(a, b, c)
			break
		diff = a - m_mod
		if diff == a:
			diff = 0
		(b, c) = (l, l + diff)
		if c <= r and m > b - c:
			print(a, b, c)
			break


import sys, math
import io, os
from bisect import bisect_left as bl, bisect_right as br, insort
from heapq import heapify, heappush, heappop
from collections import defaultdict as dd, deque, Counter

def data():
	return sys.stdin.readline().strip()

def mdata():
	return list(map(int, data().split()))

def outl(var):
	sys.stdout.write(' '.join(map(str, var)) + '\n')

def out(var):
	sys.stdout.write(str(var) + '\n')
from fractions import Fraction
INF = float('inf')
mod = int(1000000000.0) + 7
for t in range(int(data())):
	(l, r, m) = mdata()
	(a, b, c) = (0, 0, 0)
	for i in range(l, r + 1):
		if m >= i:
			k = m % i
			if r - l >= k:
				(a, b, c) = (i, r, r - k)
				break
			k = i - k
			if r - l >= k:
				(a, b, c) = (i, r - k, r)
				break
		else:
			k = i - m
			if r - l >= k:
				(a, b, c) = (i, r - k, r)
				break
	print(a, b, c)


import time, math as mt, bisect, sys
from sys import stdin, stdout
from collections import deque
from fractions import Fraction
from collections import Counter
from collections import OrderedDict
pi = 3.141592653589793

def II():
	return int(stdin.readline())

def IO():
	return stdin.readline()

def IP():
	return map(int, stdin.readline().split())

def L():
	return list(map(int, stdin.readline().split()))

def P(x):
	return stdout.write(str(x) + '\n')

def PI(x, y):
	return stdout.write(str(x) + ' ' + str(y) + '\n')

def lcm(a, b):
	return a * b // gcd(a, b)

def gcd(a, b):
	if a == 0:
		return b
	elif b == 0:
		return a
	if a > b:
		return gcd(a % b, b)
	else:
		return gcd(a, b % a)

def readTree():
	v = int(input())
	adj = [set() for i in range(v + 1)]
	for i in range(v - 1):
		(u1, u2) = In()
		adj[u1].add(u2)
		adj[u2].add(u1)
	return (adj, v)

def bfs(adj, v):
	visited = [False] * (v + 1)
	q = deque()
	while q:
		pass

def sieve():
	li = [True] * 1000001
	(li[0], li[1]) = (False, False)
	for i in range(2, len(li), 1):
		if li[i] == True:
			for j in range(i * i, len(li), i):
				li[j] = False
	prime = []
	for i in range(1000001):
		if li[i] == True:
			prime.append(i)
	return prime

def setBit(n):
	count = 0
	while n != 0:
		n = n & n - 1
		count += 1
	return count
mx = 10 ** 7
spf = [mx] * (mx + 1)

def SPF():
	spf[1] = 1
	for i in range(2, mx + 1):
		if spf[i] == mx:
			spf[i] = i
			for j in range(i * i, mx + 1, i):
				if i < spf[j]:
					spf[j] = i
	return
mod = 10 ** 9 + 7

def solve():
	(l, r, m) = IP()
	diff = r - l
	for a in range(l, r + 1):
		if m // a != 0 and m % a <= diff:
			b = l + m % a
			c = l
			print(a, b, c)
			return
		if (m // a + 1) * a - m <= diff:
			b = l
			c = l + (m // a + 1) * a - m
			print(a, b, c)
			return
t = II()
for i in range(t):
	solve()


t = int(input())
for _ in range(t):
	(l, r, m) = map(int, input().split())
	minn = 10000000001
	for x in range(l, r + 1):
		if m % x < minn and l + m % x <= r:
			minn = m % x
			a = x
		elif x - m % x < minn and r - x + m % x >= l:
			minn = -x + m % x
			a = x
	if minn > 0:
		b = l + minn
		c = l
	else:
		b = r + minn
		c = r
	if l > m:
		print(a, l, a - m + l)
	else:
		print(a, b, c)


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def RL():
	return map(int, sys.stdin.readline().rstrip().split())

def RLL():
	return list(map(int, sys.stdin.readline().rstrip().split()))

def N():
	return int(input())

def comb(n, m):
	return factorial(n) / (factorial(m) * factorial(n - m)) if n >= m else 0

def perm(n, m):
	return factorial(n) // factorial(n - m) if n >= m else 0

def mdis(x1, y1, x2, y2):
	return abs(x1 - x2) + abs(y1 - y2)

def toord(c):
	return ord(c) - ord('a')
mod = 998244353
INF = float('inf')
from math import factorial, sqrt, ceil, floor
from collections import Counter, defaultdict, deque
from heapq import heapify, heappop, heappush

def main():
	for _ in range(N()):
		(l, r, m) = RL()
		dif = r - l
		for i in range(l, r + 1):
			d = m % i
			if i <= m and d <= dif:
				print(i, r, r - d)
				break
			if i - d <= dif:
				print(i, r - i + d, r)
				break
main()


import sys, heapq as h
input = sys.stdin.readline

def getInts():
	return [int(s) for s in input().split()]

def getInt():
	return int(input())

def getStrs():
	return [s for s in input().split()]

def getStr():
	return input().strip()

def listStr():
	return list(input().strip())
import collections as col
import math

def solve():
	(L, R, M) = getInts()
	if M <= L:
		print(L, L, 2 * L - M)
		return
	for A in range(L, R + 1):
		x = M % A
		if x <= R - L:
			targ = x
			flag = True
			break
		elif A - x <= R - L:
			flag = False
			targ = A - x
			break
	(B, C) = (targ + L, L)
	if not flag:
		(C, B) = (B, C)
	print(A, B, C)
	return
for _ in range(getInt()):
	solve()


for _ in range(int(input())):
	(l, r, m) = map(int, input().split())
	a = b = c = l
	if m < r - l:
		c = 2 * l - m
	else:
		for i in range(l, r + 1):
			rem = m % i
			if i - rem <= rem:
				if i - rem <= r - l:
					c = r
					b = r - i + rem
					a = i
					if m > b - c:
						break
			elif rem <= r - l:
				b = r
				c = r - rem
				a = i
				if m > b - c:
					break
	print(a, b, c)


t = int(input())
for i in range(t):
	(l, r, m) = map(int, input().split())
	for a in range(l, r + 1):
		s = m % a
		if s <= r - l and s != m:
			print(a, l + s, l)
			break
		if abs(s - a) <= r - l:
			print(a, l, l + abs(s - a))
			break


for _ in range(int(input())):
	(l, r, m) = map(int, input().split())
	for i in range(l, r + 1):
		re1 = -(m % i)
		if m % i == 0:
			print(i, r, r)
			break
		else:
			q = m // i
			new = (q + 1) * i
			re2 = new - m
			ran = r - l
			if re1 >= -ran and re1 <= ran and (m + re1 != 0):
				b = r
				c = b + re1
				print(i, b, c)
				break
			elif re2 >= -ran and re2 <= ran:
				c = r
				b = c - re2
				print(i, b, c)
				break


import os
import sys
import math
from io import BytesIO, IOBase
from fractions import Fraction
from collections import defaultdict
from itertools import permutations
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
for _ in range(int(input())):
	(l, r, m) = map(int, input().split())
	for i in range(l, r + 1):
		d1 = m % i
		k = m // i + 1
		d2 = k * i - m
		if d1 <= r - l and (m - d1) // i > 0:
			print(i, r, r - d1)
			break
		elif d2 <= r - l and (m + d2) // i > 0:
			print(i, l, l + d2)
			break


for _ in range(int(input())):
	(l, r, m) = map(int, input().split())
	for i in range(l, r + 1):
		p = i - m % i
		q = m % i
		if l + p <= r:
			print(i, l, l + p)
			break
		if r - p >= l:
			print(i, r - p, r)
			break
		if q + l <= r:
			print(i, q + l, l)
			break
		if r - q >= l:
			print(i, r, r - q)
			break


for testcase in range(int(input())):
	(l, r, m) = map(int, input().split())
	diff = r - l
	hasans = False
	for a in range(l, r + 1):
		if m % a == 0:
			print(a, l, l)
			hasans = True
			break
		if m // a > 0 and m % a <= diff:
			print(a, r, r - m % a)
			hasans = True
			break
		if a - m % a <= diff:
			print(a, r - a + m % a, r)
			hasans = True
			break
	assert hasans


import sys
import math
input = sys.stdin.read

def solve(a):
	(l, r, m) = (a[0], a[1], a[2])
	for a in range(l, r + 1):
		n = m // a
		rr = m % a
		if n > 0 and rr <= r - l:
			c = l
			b = c + rr
			return [a, b, c]
		rr -= a
		if rr >= l - r:
			c = r
			b = c + rr
			return [a, b, c]
data = list(map(int, input().split()))
out = []
N = data[0]
tt = 1
for _ in range(N):
	ans = []
	a = data[tt:tt + 3]
	tt += 3
	ans = solve(a)
	out.append(' '.join(map(str, ans)))
print('\n'.join(out))


import math
n2 = int(input())

def bsearch(a, lst):
	(s, f) = (0, len(lst) - 1)
	while s <= f:
		mid = int((s + f) / 2)
		if lst[mid] == a:
			return a
		elif lst[mid] < a:
			s = mid + 1
		else:
			f = mid - 1
	return -1
while n2 > 0:
	(a, b, c) = (0, 0, 0)
	(bmc, found) = (0, 0)
	(l, r, m) = tuple((int(x) for x in input().split()))
	psblevals = []
	for i in range(l, r + 1):
		if max(l, m - (r - l)) <= i * math.ceil(max(l, m - (r - l)) / i) <= m + (r - l):
			psblevals.append(i * math.ceil(max(l, m - (r - l)) / i))
	bmc = m - min(psblevals)
	b = l + bmc if bmc > 0 else l
	c = b - bmc
	for i in range(l, r + 1):
		if (m - bmc) % i == 0:
			a = i
			break
	print(a, b, c)
	n2 -= 1


def triplet(l, r, m):
	(a, b, c) = (-1, -1, -1)
	for i in range(l, r + 1):
		if m % i == 0:
			print(i, l, l)
			return
		rem = m % i
		z = i - rem
		if z <= r - l:
			b = l
			c = b + z
			a = i
			print(a, b, c)
			return
		if rem <= r - l:
			c = l
			b = c + rem
			a = i
			print(a, b, c)
			return
t = int(input())
for i in range(t):
	(l, r, m) = input().split()
	triplet(int(l), int(r), int(m))


from math import ceil
for _ in range(int(input())):
	(l, r, m) = list(map(int, input().split()))
	for v in range(l, r + 1):
		a = v
		n = ceil(m / a)
		diff = m - a * n
		if abs(diff) > r - l:
			n = m // a
			if n != 0:
				diff = m - a * n
		if 0 <= diff <= r - l:
			b = r
			c = r - diff
			print(a, b, c)
			break
		elif l - r <= diff < 0:
			c = r
			b = r + diff
			print(a, b, c)
			break


production = True
import sys, math, collections

def input(input_format=0, multi=0):
	if multi > 0:
		return [input(input_format) for i in range(multi)]
	else:
		next_line = sys.stdin.readline()[:-1]
		if input_format >= 10:
			use_list = False
			input_format = int(str(input_format)[-1])
		else:
			use_list = True
		if input_format == 0:
			formatted_input = [next_line]
		elif input_format == 1:
			formatted_input = list(map(int, next_line.split()))
		elif input_format == 2:
			formatted_input = list(map(float, next_line.split()))
		elif input_format == 3:
			formatted_input = list(next_line)
		elif input_format == 4:
			formatted_input = list(map(int, list(next_line)))
		elif input_format == 5:
			formatted_input = next_line.split()
		else:
			formatted_input = [next_line]
		return formatted_input if use_list else formatted_input[0]

def out(output_line, output_format=0, newline=True):
	formatted_output = ''
	if output_format == 0:
		formatted_output = str(output_line)
	elif output_format == 1:
		formatted_output = ' '.join(map(str, output_line))
	elif output_format == 2:
		formatted_output = '\n'.join(map(str, output_line))
	print(formatted_output, end='\n' if newline else '')

def log(*args):
	if not production:
		print('$$$', end='')
		print(*args)
enu = enumerate
ter = lambda a, b, c: b if a else c
ceil = lambda a, b: -(-a // b)

def mapl(iterable, format=0):
	if format == 0:
		return list(map(int, iterable))
	elif format == 1:
		return list(map(str, iterable))
	elif format == 2:
		return list(map(list, iterable))

def solve():
	(l, r, m) = input(1)
	z = 500000
	p = [0] * (2 * z + 5)
	lp = len(p)
	smin = max(0, m - z)
	smax = m + z
	for i in range(l, r + 1):
		if not p[i]:
			for j in range(i, lp, i):
				bf = j - smin % i
				if bf > 0:
					p[bf] = 1
	log(l - r, r - l)
	for i in range(l - r, r - l + 1):
		u = m + i
		if u - smin < 0:
			continue
		log(u - smin, smin)
		if p[u - smin]:
			for j in range(l, r + 1):
				if not u % j:
					if i > 0:
						c = r
						b = r - i
					else:
						b = r
						c = r + i
					a = j
					out([a, b, c], 1)
					return
	return
for i in range(input(11)):
	solve()


def main():
	(l, r, m) = map(int, input().split(' '))
	d = r - l
	nmin = (m - d) // r
	nmax = (m + d) // l
	for n in range(nmin, nmax + 1):
		if n == 0:
			continue
		amin = (m - d) // n
		amax = (m + d) // n
		for a in range(max(l, amin), min(r, amax) + 1):
			bc = m - a * n
			if -d <= bc <= d:
				if bc > 0:
					b = r
					c = r - bc
				else:
					c = r
					b = r + bc
				print(a, bc + c, c)
				return
for _ in range(int(input())):
	main()


import sys
input = lambda : sys.stdin.readline().rstrip()

def answer(l=None, r=None, m=None):
	if l is None:
		(l, r, m) = map(int, input().split(' '))
	max_n = (m + l) // (l + 1)
	min_n = (m + l) // (r + 1) + 1
	found = False
	for n in range(min_n, max_n + 1):
		a0 = (m + r - l) // n
		if l <= a0 <= r:
			a = a0
			if m + l <= n * a0 + l <= m + r:
				found = True
				b = l
				c = n * a + b - m
			else:
				c = l
				b = n * a0 - m - c
				if l <= b <= r:
					found = True
		elif n * r + l <= m + l <= n * r + r:
			a = r
			c = l
			b = m + c - n * a
			if l <= b <= r:
				found = True
		if found:
			break
	if not found:
		n = a = b = c = 0
	return (n, a, b, c)

def answer0(l=None, r=None, m=None):
	if l is None:
		(l, r, m) = map(int, input().split(' '))
	n1 = (m + r) // l
	if n1 <= 1:
		n1 = 2
	n = n1 - 1
	if n1 * l >= m + l:
		a = l
		b = l
		c = n1 * l - m
	else:
		tmp = m + l - r
		a = (m + l - r) // n
		if tmp % n != 0:
			a += 1
		if n * a + r <= m + r:
			b = r
			c = n * a + b - m
		else:
			c = r
			b = m + c - n * a
	return (n, a, b, c)
nn = int(input())
for _ in range(nn):
	input_ = input()
	(l, r, m) = map(int, input_.split(' '))
	(n, a, b, c) = answer(l, r, m)
	if a == 0:
		(n, a, b, c) = answer0(l, r, m)
	print('%d %d %d' % (a, b, c))
if False:
	import random
	M1 = 10
	M2 = 10
	for i in range(100000000):
		l = random.randint(1, M1 + 1)
		r = random.randint(l, M1 + 1)
		m = random.randint(1, M2 + 1)
		(n, a, b, c) = answer(l, r, m)
		out1 = n * a + b - c
		out2 = m
		if out1 != out2 or not l <= a <= r or (not l <= b <= r) or (not l <= c <= r) or (n <= 0):
			print(l, r, m, n, a, b, c, out1, out2)


import math
n2 = int(input())
while n2 > 0:
	(a, b, c) = (0, 0, 0)
	(bmc, found) = (0, 0)
	(l, r, m) = tuple((int(x) for x in input().split()))
	psblevals = []
	for i in range(l, r + 1):
		if max(l, m - (r - l)) <= i * math.ceil(max(l, m - (r - l)) / i) <= m + (r - l):
			psblevals.append(i * math.ceil(max(l, m - (r - l)) / i))
	bmc = m - min(psblevals)
	b = l + bmc if bmc > 0 else l
	c = b - bmc
	for i in range(l, r + 1):
		if (m - bmc) % i == 0:
			a = i
			break
	print(a, b, c)
	n2 -= 1


t = int(input())
for i in range(t):
	(l, r, m) = [int(i) for i in input().split()]
	for x in range(l, r + 1):
		if m < x:
			a = x
			b = l
			c = l - m + x
			break
		elif l - r <= m % x - x <= r - l:
			a = x
			b = r + m % x - x
			c = r
			break
		elif l - r <= m % x <= r - l:
			a = x
			b = r
			c = r - m % x
			break
	print(a, b, c)


def checker(x, r, n):
	for j in range(r, x - 1, -1):
		if n % j <= r - x and n - n % j > 0:
			return (j, x + n % j, x)
		elif j - n % j <= r - x and n + j - n % j > 0:
			return (j, x, x + j - n % j)
for _ in range(int(input())):
	(a, b, c) = [int(i) for i in input().split()]
	print(*checker(a, b, c))


import sys
import math
import heapq
import collections

def inputnum():
	return int(input())

def inputnums():
	return map(int, input().split())

def inputlist():
	return list(map(int, input().split()))

def inputstring():
	return [x for x in input()]

def inputmatrixchar(rows):
	arr2d = [[j for j in input().strip()] for i in range(rows)]
	return arr2d

def inputmatrixint(rows):
	arr2d = []
	for _ in range(rows):
		arr2d.append([int(i) for i in input().split()])
	return arr2d

def divup(a, b):
	if a % b == 0:
		return a // b
	else:
		return a // b + 1
t = int(input())
for q in range(t):
	(l, r, m) = inputnums()
	a = 0
	b = 0
	c = 0
	for i in range(l, r + 1):
		if m - m // i * i <= r - l and m // i > 0:
			a = i
			b = r
			c = b + m // a * a - m
			break
		elif divup(m, i) * i - m <= r - l:
			a = i
			b = l
			c = b + divup(m, a) * a - m
			break
	print(a, b, c)


t = int(input())
for _ in range(t):
	(l, r, m) = map(int, input().split())
	for a in range(l, r + 1):
		x = m % a
		y = x
		k = (y + r - l) // a
		y = y - k * a
		if y < l - r or y > r - l:
			continue
		if (m - y) // a > 0:
			if y <= 0:
				print(a, l, l - y)
			else:
				print(a, r, r - y)
			break


import sys
t = int(input())

def find(_l, _r, x):
	if x >= 0:
		return (_l + x, _l)
	return (_l, _l - x)

def solve():
	(l, r, m) = map(int, input().split())
	for a in range(l, r + 1):
		for v in [m % a, m % a - a] if m >= a else [m % a - a]:
			if abs(v) <= r - l:
				(b, c) = find(l, r, v)
				print(a, b, c)
				return
for _ in range(t):
	solve()


t = int(input())
for _ in range(t):
	(l, r, m) = map(int, input().split())
	for a in range(l, r + 1):
		d = m % a
		if l <= r - d:
			b = r
			c = r - d
			if m - b + c != 0:
				break
		if l + (a - d) <= r:
			b = l
			c = l + (a - d)
			break
		else:
			continue
	print(a, b, c)


import random

def find_bc(diff, l, r):
	if diff > 0:
		return (r, r - diff)
	elif diff == 0:
		return (l, l)
	else:
		return (l, l - diff)

def solve(l, r, m):
	starter = [l, l + 1, l + 2, r - 2, r - 1, r]
	for a in starter:
		(n_1, n_2) = (max(1, m // a), m // a + 1)
		for n in (n_1, n_2):
			if abs(n * a - m) <= r - l:
				print(a, *find_bc(m - n * a, l, r))
				return
	for a in reversed(range(l, r + 1)):
		(n_1, n_2) = (max(1, m // a), m // a + 1)
		for n in (n_1, n_2):
			if abs(n * a - m) <= r - l:
				print(a, *find_bc(m - n * a, l, r))
				return

def run():
	for t in range(int(input())):
		solve(*map(int, input().split()))
run()


from collections import deque, defaultdict
from heapq import heapify, heappop, heappush
it = lambda : list(map(int, input().strip().split()))

def solve():
	(l, r, m) = it()
	for a in range(l, r + 1):
		u1 = m % a
		v1 = m // a
		if v1 != 0 and l + u1 <= r:
			print(a, l + u1, l)
			return
		v2 = (m // a + 1) * a
		u2 = v2 - m
		if v2 != 0 and l + u2 <= r:
			print(a, l, l + u2)
			return
T = int(input())
for _ in range(T):
	solve()


from sys import stdin, stdout

def dubious_cyrpto(l, r, m):
	mr = 10 ** 6
	(a, b, c) = (0, 0, 0)
	for i in range(l, r + 1):
		m1 = m % i
		m2 = i - m % i
		if m < i:
			mm = m2
		else:
			mm = min(m1, m2)
		if mm < mr:
			a = i
			mr = mm
	if a - m % a == mr:
		(b, c) = (l, l + mr)
	else:
		(b, c) = (r, r - mr)
	return [a, b, c]
t = int(stdin.readline())
for i in range(t):
	(l, r, m) = map(int, stdin.readline().split())
	res = dubious_cyrpto(l, r, m)
	stdout.write(' '.join(map(str, res)) + '\n')


from collections import Counter
import math
import sys
from bisect import bisect, bisect_left, bisect_right

def input():
	return sys.stdin.readline().strip()

def INT():
	return int(input())

def MAP():
	return map(int, input().split())

def LIST(N=None):
	return list(MAP()) if N is None else [INT() for i in range(N)]

def mod():
	return 10 ** 9 + 7
for i in range(INT()):
	(l, r, m) = map(int, input().split())
	a = r - l
	for i in range(l, r + 1):
		b = m % i
		if b <= a and m >= i:
			print(i, l + b, l)
			break
		elif b >= i - a:
			print(i, l, l + i - b)
			break


from sys import stdin, stdout
st = lambda : list(stdin.readline().strip())
li = lambda : list(map(int, stdin.readline().split()))
mp = lambda : map(int, stdin.readline().split())
inp = lambda : int(stdin.readline())
pr = lambda n: stdout.write(str(n) + '\n')

def solve():
	(l, r, m) = mp()
	d = r - l
	for a in range(l, r + 1):
		rem = m % a
		if rem <= d:
			c = l
			b = l + rem
			if m != b - c:
				break
		rem = a - rem
		if rem <= d:
			b = l
			c = l + rem
			if m != b - c:
				break
	print(a, b, c)
for _ in range(inp()):
	solve()


from math import *

def factors(n, l, r):
	for j in range(1, int(ceil(sqrt(n)) + 1)):
		if n % j == 0:
			if j >= l and j <= r:
				return j
			elif n // j >= l and n // j <= r:
				return n // j
	return -1
for _ in range(int(input())):
	(l, r, m) = map(int, input().split())
	for i in range(l, r + 1):
		x = r - i
		if m - x > 0:
			a = factors(m - x, l, r)
			if a != -1:
				print(a, r, i)
				break
		x = i - r
		if m - x > 0:
			a = factors(m - x, l, r)
			if a != -1:
				print(a, i, r)
				break


import sys
input = sys.stdin.readline

def ceil(x):
	if x != int(x):
		x = int(x) + 1
	return x

def swaparr(arr, a, b):
	temp = arr[a]
	arr[a] = arr[b]
	arr[b] = temp

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

def nCr(n, k):
	if k > n - k:
		k = n - k
	res = 1
	for i in range(k):
		res = res * (n - i)
		res = res / (i + 1)
	return int(res)

def upper_bound(a, x, lo=0, hi=None):
	if hi == None:
		hi = len(a)
	while lo < hi:
		mid = (lo + hi) // 2
		if a[mid] < x:
			lo = mid + 1
		else:
			hi = mid
	return lo

def primefs(n):
	primes = {}
	while n % 2 == 0 and n > 0:
		primes[2] = primes.get(2, 0) + 1
		n = n // 2
	for i in range(3, int(n ** 0.5) + 2, 2):
		while n % i == 0 and n > 0:
			primes[i] = primes.get(i, 0) + 1
			n = n // i
	if n > 2:
		primes[n] = primes.get(n, 0) + 1
	return primes

def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def swap(a, b):
	temp = a
	a = b
	b = temp
	return (a, b)

def find(x, link):
	p = x
	while p != link[p]:
		p = link[p]
	while x != p:
		nex = link[x]
		link[x] = p
		x = nex
	return p

def union(x, y, link, size):
	x = find(x, link)
	y = find(y, link)
	if size[x] < size[y]:
		(x, y) = swap(x, y)
	if x != y:
		size[x] += size[y]
		link[y] = x

def sieve(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime
MAXN = int(100000.0 + 5)

def spf_sieve():
	spf[1] = 1
	for i in range(2, MAXN):
		spf[i] = i
	for i in range(4, MAXN, 2):
		spf[i] = 2
	for i in range(3, ceil(MAXN ** 0.5), 2):
		if spf[i] == i:
			for j in range(i * i, MAXN, i):
				if spf[j] == j:
					spf[j] = i

def factoriazation(x):
	ret = {}
	while x != 1:
		ret[spf[x]] = ret.get(spf[x], 0) + 1
		x = x // spf[x]
	return ret

def int_array():
	return list(map(int, input().strip().split()))

def str_array():
	return input().strip().split()
MOD = int(1000000000.0) + 7
CMOD = 998244353
INF = float('inf')
NINF = -float('inf')
for _ in range(int(input())):
	(l, r, m) = int_array()
	for i in range(l, r + 1):
		x = m % i
		if m < i:
			if i - m <= r - l:
				print(i, l, l + i - m)
				break
		elif x <= r - l:
			print(i, r, r - x)
			break
		else:
			k = (m // i + 1) * i
			if k - m <= r - l:
				print(i, l, l + k - m)
				break


import sys
from collections import defaultdict, deque, Counter
import math
from bisect import bisect_left, bisect_right
import heapq
input = sys.stdin.readline
getS = lambda : input().strip()
getN = lambda : int(input())
getList = lambda : list(map(int, input().split()))
getZList = lambda : [int(x) - 1 for x in input().split()]
INF = 10 ** 20
MOD = 10 ** 9 + 7
divide = lambda x: pow(x, MOD - 2, MOD)

def nck(n, k, kaijyo):
	return npk(n, k, kaijyo) * divide(kaijyo[k]) % MOD

def npk(n, k, kaijyo):
	if k == 0 or k == n:
		return n % MOD
	return kaijyo[n] * divide(kaijyo[n - k]) % MOD

def kaijyo(n):
	ret = [1]
	for i in range(1, n + 1):
		ret.append(ret[-1] * i % MOD)
	return ret

def solve():
	(l, r, m) = getList()
	sabun = r - l
	for i in range(l, r + 1):
		a = i
		if m >= a:
			amari = m % a
			if amari <= sabun:
				c = l
				b = c + amari
				print(a, b, c)
				return
		husoku = a - m % a
		if husoku <= sabun:
			b = l
			c = b + husoku
			print(a, b, c)
			return

def main():
	n = getN()
	for _ in range(n):
		solve()
main()


from sys import stdin
input = stdin.readline
t = int(input())
for case in range(t):
	(l, r, m) = map(int, input().split())
	diff = r - l
	for i in range(l, r + 1):
		Q = m // i
		R = m % i
		if Q and R <= diff:
			print(i, l + R, l)
			break
		elif i - R <= diff:
			print(i, r - (i - R), r)
			break


def main():
	(l, r, m) = map(int, input().split())
	for i in range(l, r + 1):
		a = i
		n = m // a
		n2 = n + 1
		if n <= 0:
			n = 1
			n2 += 1
		temp = m - n * a
		temp2 = m - n2 * a
		if temp >= 0:
			if temp + l <= r:
				b = temp + l
				c = l
				print(a, b, c)
				return
		elif abs(temp) + l <= r:
			c = abs(temp) + l
			b = l
			print(a, b, c)
			return
		if temp2 >= 0:
			if temp2 + l <= r:
				b = temp2 + l
				c = l
				print(a, b, c)
				return
		elif abs(temp2) + l <= r:
			c = abs(temp2) + l
			b = l
			print(a, b, c)
			return
	return

def test():
	t = int(input())
	while t:
		main()
		t -= 1
test()


import sys
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush, nsmallest
from math import ceil, floor, gcd, fabs, factorial, fmod, sqrt, inf
from collections import defaultdict as dd, deque, Counter as C
from itertools import combinations as comb, permutations as perm
from bisect import bisect_left as bl, bisect_right as br, bisect
from time import perf_counter
from fractions import Fraction
from decimal import Decimal
mod = pow(10, 9) + 7
mod2 = 998244353

def data():
	return sys.stdin.readline().strip()

def out(var):
	sys.stdout.write(str(var) + '\n')

def outa(*var, end='\n'):
	sys.stdout.write(' '.join(map(str, var)) + end)

def l():
	return list(sp())

def sl():
	return list(ssp())

def sp():
	return map(int, data().split())

def ssp():
	return map(str, data().split())

def l1d(n, val=0):
	return [val for i in range(n)]

def l2d(n, m, val=0):
	return [l1d(n, val) for j in range(m)]
for _ in range(int(data())):
	(left, r, m) = sp()
	if left == r:
		outa(left, left, left)
		continue
	diff = r - left
	for i in range(left, r + 1):
		temp = m // i
		if temp * i + diff >= m >= temp * i and temp:
			outa(i, left + m - temp * i, left)
			break
		temp = m // i + 1
		if temp * i - diff <= m <= temp * i and temp:
			outa(i, left, left + temp * i - m)
			break


import io
import os
from collections import Counter, defaultdict, deque

def solve(L, R, M):
	D = R - L
	for A in range(L, R + 1):
		if (M + D) % A <= 2 * D:
			N = (M + D) // A
			assert -D <= M - N * A <= D
			assert -D <= M - N * A <= D
			diff = M - N * A
			if diff < 0:
				B = R + diff
				C = R
			else:
				assert diff >= 0
				B = L + diff
				C = L
			assert M == N * A + B - C
			return str(A) + ' ' + str(B) + ' ' + str(C)
if False:
	for l in range(1, 10):
		for r in range(l, 10):
			for m in range(1, 10):
				solve(l, r, m)
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
T = int(input())
for t in range(T):
	(L, R, M) = [int(x) for x in input().split()]
	ans = solve(L, R, M)
	print(ans)


def f():
	(l, r, m) = map(int, input().split())
	L = m - (r - l)
	R = m + (r - l)
	for a in range(l, r + 1):
		n = R // a
		if a * n >= L and a * n <= R:
			return (a, n, m, r)
t = int(input())
for i in range(t):
	(a, n, m, r) = f()
	o = m - a * n
	if o < 0:
		c = r
		b = r + o
	elif o > 0:
		b = r
		c = r - o
	else:
		(b, c) = (r, r)
	print(a, b, c)


n = 100
t = int(input())
for _ in range(t):
	(l, r, m) = map(int, input().split())
	for i in range(l, r + 1):
		low = m - m % i
		high = low + i
		if low + r - l >= m and low > 0:
			dif = m - low
			print(i, l + dif, l)
			break
		elif high - r + l <= m and high > 0:
			dif = high - m
			print(i, l, l + dif)
			break


TC = int(input())
for tc in range(TC):
	(L, R, M) = map(int, input().split())
	min_n = -(-(M - R + L) // R)
	max_n = (M + R - L) // L
	found = False
	if min_n < 1:
		min_n = 1
	for n in range(min_n, max_n + 1):
		for y in range(L - R, R - L + 1):
			if (M - y) % n == 0:
				A = (M - y) // n
				if A <= R:
					if y > 0:
						B = R
						C = R - y
					else:
						C = R
						B = R + y
					found = True
					break
		if found:
			break
	print(A, B, C)


t = int(input())
for _ in range(0, t):
	entry = input().split()
	l = int(entry[0])
	r = int(entry[1])
	m = int(entry[2])
	diff = r - l
	for a in range(r, l - 1, -1):
		if m < l:
			print(l, l, l + (l - m))
			break
		rem = m % a
		if rem <= diff or rem >= a - diff:
			if rem <= diff:
				print(a, r, r - rem)
				break
			else:
				print(a, l, l + (a - rem))
				break


t = int(input())
for _ in range(t):
	(l, r, m) = [int(p) for p in input().split()]
	n = m // l
	if n == 0:
		print(l, l, 2 * l - m)
		continue
	else:
		minRem = float('inf')
		for i in range(l, r + 1):
			prev = minRem
			minRem = min(minRem, m % i, i - m % i)
			if prev != minRem:
				ele = i
	if minRem == ele - m % ele:
		print(ele, l, l + minRem)
	else:
		print(ele, l + minRem, l)


import math
import sys
from sys import stdin
import re
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	(l, r, m) = (int(x) for x in input().split())
	diffp = r - l
	diffn = l - r
	for i in range(l, r + 1):
		if m % i >= 0 and m % i <= diffp % i:
			if m != m % i:
				print(i, l + m % i, l)
				break
		if m % i >= (diffn % i + i) % i and m % i <= i - 1:
			print(i, l, l - m % i + i)
			break


from sys import *
from math import *
t = int(stdin.readline())
for _ in range(t):
	(l, r, m) = map(int, stdin.readline().split())
	a = r
	f = 0
	x = m % a
	for i in range(l, r + 1):
		if m % i <= x and m - m % i > 0:
			a = i
			x = m % i
			f = 1
	if f == 1 and m % a <= r - l:
		c = l
		b = c + x
	else:
		a = r
		x = a - m % a
		for i in range(l, r + 1):
			if i - m % i < x:
				a = i
				x = i - m % i
		b = l
		c = b + x
	print(a, b, c)


for _ in range(int(input())):
	(l, r, m) = map(int, input().split())
	for a in range(l, r + 1):
		R = m % a
		Q = m // a
		if Q != 0:
			if r - l >= R:
				print(a, l + R, l)
				break
			elif r - l >= a - R:
				print(a, l, l + a - R)
				break
		elif r - l >= a - R:
			print(a, l, l + a - R)
			break


import sys

def swap(x, y, a):
	temp = a[x]
	a[x] = a[y]
	a[y] = temp
	return a

def solve():
	return None

def main():
	q = []
	for line in sys.stdin.readlines():
		q.append(line)
	for i in range(len(q)):
		q[i] = q[i].rstrip().split(' ')
		q[i] = [int(x) for x in q[i]]
	for i in range(1, len(q)):
		l = q[i][0]
		r = q[i][1]
		m = q[i][2]
		diff = r - l
		diff2 = l - r
		for i in range(r, l - 1, -1):
			temp = m % i
			if temp <= diff and temp != m:
				print(i, l + temp, l)
				break
			elif temp - i >= diff2 and temp - i != m:
				print(i, l, l + i - temp)
				break
main()


z = input
mod = 10 ** 9 + 7
from collections import *
from queue import *
from sys import *
from collections import *
from math import *
from heapq import *
from itertools import *
from bisect import *
from collections import Counter as cc
from math import factorial as f

def lcd(xnum1, xnum2):
	return xnum1 * xnum2 // gcd(xnum1, xnum2)
for _ in range(int(z())):
	(l, r, m) = map(int, z().split())
	for i in range(l, r + 1):
		rem = m % i
		if rem != m and rem <= r - l:
			print(i, l + rem, l)
			break
		if rem >= i - (r - l):
			print(i, l, l + (i - rem))
			break


from random import randint
for __ in range(int(input())):
	(l, r, m) = list(map(int, input().split()))
	for i in range(l, r + 1):
		n = (m + r - l) // i
		if n > 0 and n * i >= m - r + l:
			x = n * i - m
			if x >= 0:
				print(i, l, l + x)
			else:
				print(i, r, r + x)
			break


from sys import stdin, stdout
from math import gcd, ceil, sqrt
from collections import Counter
from bisect import bisect_left, bisect_right
ii1 = lambda : int(stdin.readline().strip())
is1 = lambda : stdin.readline().strip()
iia = lambda : list(map(int, stdin.readline().strip().split()))
isa = lambda : stdin.readline().strip().split()
mod = 1000000007

def solve(l, r, m):
	for i in range(l, r + 1):
		if m % i == 0:
			return [i, l, l]
		else:
			need = m % i
			if r - l >= need and m - need > 0:
				return [i, r, r - need]
			elif i - need <= r - l:
				return [i, r - (i - need), r]
tc = ii1()
for _ in range(tc):
	(l, r, m) = iia()
	if l != r:
		print(*solve(l, r, m))
	else:
		print(l, l, l)


import bisect
import os
import gc
import sys
from io import BytesIO, IOBase
from collections import Counter
from collections import deque
import heapq
import math
import statistics

def sin():
	return input()

def ain():
	return list(map(int, sin().split()))

def sain():
	return input().split()

def iin():
	return int(sin())
MAX = float('inf')
MIN = float('-inf')
MOD = 1000000007

def sieve(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	s = set()
	for p in range(2, n + 1):
		if prime[p]:
			s.add(p)
	return s

def readTree(n, m):
	adj = [deque([]) for _ in range(n + 1)]
	for _ in range(m):
		(u, v) = ain()
		adj[u].append(v)
		adj[v].append(u)
	return adj

def main():
	for _ in range(iin()):
		(l, r, m) = ain()
		diff = r - l
		for i in range(r, l - 1, -1):
			mm1 = m % i
			mm2 = i - mm1
			if mm1 <= diff and m >= i:
				print(i, r, r - mm1)
				break
			elif mm2 <= diff:
				print(i, l, l + mm2)
				break
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


for _ in range(int(input())):
	(l, r, m) = map(int, input().strip().split(' '))
	res1 = m - r + l
	res2 = m + r - l
	for i in range(l, r + 1):
		n = res2 // i
		if n * i < res1 or n * i > res2:
			continue
		flag = n * i - m
		if flag >= 0:
			print(i, l, l + flag)
		else:
			print(i, r, r + flag)
		break


T = int(input())
for t in range(T):
	(l, r, m) = list(map(int, input().split()))
	gap = r - l
	for i in range(l, r + 1):
		rem = m % i
		if rem <= gap and m - rem > 0:
			print(i, l + rem, l)
			break
		elif i - rem <= gap:
			print(i, l, l + (i - rem))
			break


import os
import sys
from io import BytesIO, IOBase
profile = 0
pypy = 1

def iin():
	return int(input())

def lin():
	return list(map(int, input().split()))

def main():
	T = iin()
	while T:
		T -= 1
		(l, r, m) = lin()
		df = abs(r - l)
		(a, b, c) = (-1, -1, -1)
		for i in range(l, r + 1):
			x = m % i
			x1 = m // i
			if x <= df and x1:
				a = i
				b = l + x
				c = l
				break
			x = -x % i
			if x <= df:
				a = i
				b = l
				c = l + x
				break
		print(a, b, c)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
if pypy:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
	input = lambda : sys.stdin.readline().rstrip('\r\n')
if profile:
	import cProfile
	cProfile.run('main()')
else:
	main()


import math
import collections
import bisect
import heapq
import time
import random
import itertools
import sys
from typing import List

def solve(L, R, M):
	D = R - L
	for a in range(R, L - 1, -1):
		k = (M + D) // a
		if k <= 0:
			continue
		v = k * a
		if M - D <= v <= M + D:
			diff = M - v
			(b, c) = (L + abs(diff), L)
			if diff < 0:
				(b, c) = (c, b)
			return '{} {} {}'.format(a, b, c)
T = int(input())
for ti in range(T):
	(L, R, M) = map(int, input().split())
	print(solve(L, R, M))


import math

def main():
	for _ in range(int(input())):
		(l, r, m) = map(int, input().split())
		flag = False
		for i in range(l, min(r, m) + 1):
			if l - r <= m % i <= r - l:
				print(i, l + m % i, l)
				flag = True
				break
		if not flag:
			for i in range(m + (r - l), m - 1, -1):
				for j in range(1, math.ceil(math.sqrt(i)) + 1):
					if i % j == 0:
						if l <= j <= r:
							print(j, r - (i - m), r)
							flag = True
							break
						elif l <= i // j <= r:
							print(i // j, r - (i - m), r)
							flag = True
							break
				if flag:
					break
main()


T = int(input())
for _ in range(T):
	(l, r, m) = map(int, input().split())
	a = 0
	b = 0
	c = 0
	mini = 0
	max_diff = r - l
	for i in range(l, r + 1):
		if m % i <= max_diff and int(m / i) != 0:
			a = i
			b = r
			c = r - m % i
			break
		elif i - m % i <= max_diff:
			a = i
			c = r
			b = r - (i - m % i)
			break
	print(a, b, c)


T = int(input())
for test in range(T):
	(l, r, m) = map(int, input().split())
	posminrem = 10 ** 10
	negminrem = -10 ** 10
	for i in range(l, r + 1):
		if m % i < posminrem:
			posminrem = m % i
			posa = i
		if m % i - i > negminrem:
			negminrem = m % i - i
			nega = i
	minrem = min(posminrem, -negminrem)
	if m == posminrem:
		a = nega
		c = r
		b = r + negminrem
	elif minrem == posminrem:
		a = posa
		c = l
		b = l + minrem
	else:
		a = nega
		c = r
		b = r + negminrem
	print(a, b, c)


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	(l, r, m) = map(int, input().split())
	for a in range(l, r + 1):
		remainder = m % a
		if l <= l + remainder <= r and m >= a:
			ans = [a, l + remainder, l]
		elif l <= l + a - remainder <= r:
			ans = [a, l, l + a - remainder]
	print(*ans)


t = int(input())
for trial in range(t):
	(l, r, m) = map(int, input().split())
	diff = r - l
	for i in range(l, r + 1):
		if i < m and m % i <= diff:
			print(i, m % i + l, l)
			break
		elif i < m and m % i >= i - diff:
			print(i, l, i - m % i + l)
			break
		elif i == m:
			print(i, l, l)
			break
		elif i > m:
			print(i, l, l + i - m)
			break


from collections import defaultdict, Counter
from bisect import bisect, bisect_left
from math import sqrt, gcd, ceil, factorial
from heapq import heapify, heappush, heappop
MOD = 10 ** 9 + 7
inf = float('inf')
ans_ = []

def nin():
	return int(input())

def ninf():
	return int(file.readline())

def st():
	return input().strip()

def stf():
	return file.readline().strip()

def read():
	return list(map(int, input().strip().split()))

def readf():
	return list(map(int, file.readline().strip().split()))

def solve():
	for _ in range(nin()):
		(l, r, m) = read()
		a = b = c = 0
		for a in range(l, r + 1):
			m1 = m % a
			m2 = a - m1
			if a <= m and m1 <= r - l:
				b = l + m1
				c = l
				break
			elif m2 <= r - l:
				b = l
				c = l + m2
				break
		ans_.append([a, b, c])
solve()
for i in ans_:
	print(*i)


from bisect import *
from collections import *
from math import gcd, ceil, sqrt, floor, inf
from heapq import *
from itertools import *
from operator import add, mul, sub, xor, truediv, floordiv
from functools import *
import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def RL():
	return map(int, sys.stdin.readline().rstrip().split())

def RLL():
	return list(map(int, sys.stdin.readline().rstrip().split()))

def N():
	return int(input())
from types import GeneratorType

def bootstrap(f, stack=[]):

	def wrappedfunc(*args, **kwargs):
		if stack:
			return f(*args, **kwargs)
		else:
			to = f(*args, **kwargs)
			while True:
				if type(to) is GeneratorType:
					stack.append(to)
					to = next(to)
				else:
					stack.pop()
					if not stack:
						break
					to = stack[-1].send(to)
			return to
	return wrappedfunc
farr = [1]
ifa = []

def fact(x, mod=0):
	if mod:
		while x >= len(farr):
			farr.append(farr[-1] * len(farr) % mod)
	else:
		while x >= len(farr):
			farr.append(farr[-1] * len(farr))
	return farr[x]

def ifact(x, mod):
	global ifa
	ifa.append(pow(farr[-1], mod - 2, mod))
	for i in range(x, 0, -1):
		ifa.append(ifa[-1] * i % mod)
	ifa = ifa[::-1]

def per(i, j, mod=0):
	if i < j:
		return 0
	if not mod:
		return fact(i) // fact(i - j)
	return farr[i] * ifa[i - j] % mod

def com(i, j, mod=0):
	if i < j:
		return 0
	if not mod:
		return per(i, j) // fact(j)
	return per(i, j, mod) * ifa[j] % mod

def catalan(n):
	return com(2 * n, n) // (n + 1)

def linc(f, t, l, r):
	while l < r:
		mid = (l + r) // 2
		if t > f(mid):
			l = mid + 1
		else:
			r = mid
	return l

def rinc(f, t, l, r):
	while l < r:
		mid = (l + r + 1) // 2
		if t < f(mid):
			r = mid - 1
		else:
			l = mid
	return l

def ldec(f, t, l, r):
	while l < r:
		mid = (l + r) // 2
		if t < f(mid):
			l = mid + 1
		else:
			r = mid
	return l

def rdec(f, t, l, r):
	while l < r:
		mid = (l + r + 1) // 2
		if t > f(mid):
			r = mid - 1
		else:
			l = mid
	return l

def isprime(n):
	for i in range(2, int(n ** 0.5) + 1):
		if n % i == 0:
			return False
	return True

def binfun(x):
	c = 0
	for w in arr:
		c += ceil(w / x)
	return c

def lowbit(n):
	return n & -n

def inverse(a, m):
	a %= m
	if a <= 1:
		return a
	return (1 - inverse(m, a) * m) // a % m

class BIT:

	def __init__(self, arr):
		self.arr = arr
		self.n = len(arr) - 1

	def update(self, x, v):
		while x <= self.n:
			self.arr[x] += v
			x += x & -x

	def query(self, x):
		ans = 0
		while x:
			ans += self.arr[x]
			x &= x - 1
		return ans

class DSU:

	def __init__(self, n):
		self.c = [-1] * n

	def same(self, x, y):
		return self.find(x) == self.find(y)

	def find(self, x):
		if self.c[x] < 0:
			return x
		self.c[x] = self.find(self.c[x])
		return self.c[x]

	def union(self, u, v):
		(u, v) = (self.find(u), self.find(v))
		if u == v:
			return False
		if self.c[u] < self.c[v]:
			(u, v) = (v, u)
		self.c[u] += self.c[v]
		self.c[v] = u
		return True

	def size(self, x):
		return -self.c[self.find(x)]

class UFS:

	def __init__(self, n):
		self.parent = [i for i in range(n)]
		self.ranks = [0] * n

	def find(self, x):
		if x != self.parent[x]:
			self.parent[x] = self.find(self.parent[x])
		return self.parent[x]

	def union(self, u, v):
		(pu, pv) = (self.find(u), self.find(v))
		if pu == pv:
			return False
		if self.ranks[pu] >= self.ranks[pv]:
			self.parent[pv] = pu
			if self.ranks[pv] == self.ranks[pu]:
				self.ranks[pu] += 1
		else:
			self.parent[pu] = pv

def Prime(n):
	c = 0
	prime = []
	flag = [0] * (n + 1)
	for i in range(2, n + 1):
		if not flag[i]:
			prime.append(i)
			c += 1
		for j in range(c):
			if i * prime[j] > n:
				break
			flag[i * prime[j]] = prime[j]
			if i % prime[j] == 0:
				break
	return prime

def dij(s, graph):
	d = {}
	d[s] = 0
	heap = [(0, s)]
	seen = set()
	while heap:
		(dis, u) = heappop(heap)
		if u in seen:
			continue
		for v in graph[u]:
			if v not in d or d[v] > d[u] + graph[u][v]:
				d[v] = d[u] + graph[u][v]
				heappush(heap, (d[v], v))
	return d

def GP(it):
	return [(ch, len(list(g))) for (ch, g) in groupby(it)]

class DLN:

	def __init__(self, val):
		self.val = val
		self.pre = None
		self.next = None
t = N()
for i in range(t):
	(l, r, m) = RL()
	k = r - l
	for a in range(l, r + 1):
		ma = (m + k) // a
		mi = max(1, (m - k + a - 1) // a)
		if ma >= mi:
			n = mi
			d = m - n * a
			if d >= 0:
				c = l
				b = c + d
			else:
				c = r
				b = c + d
			break
	print(a, b, c)


t = int(input())
while t:
	t -= 1
	(l, r, m) = [int(x) for x in input().split()]
	for a in range(l, r + 1):
		x = m % a
		b = r
		c = r - x
		if m != x and c >= l and (c <= r):
			arr = [a, b, c]
			print(*arr)
			break
		b = l
		c = l + (a - x)
		if c >= l and c <= r:
			arr = [a, b, c]
			print(*arr)
			break


from __future__ import division, print_function
from fractions import Fraction
import sys
import os
from io import BytesIO, IOBase
from itertools import *
import bisect
from heapq import *
from math import *
from copy import *
from collections import deque
from collections import Counter as counter
from itertools import combinations as comb
from itertools import permutations as permutate
from bisect import bisect_left as bl
from bisect import bisect_right as br
from bisect import bisect
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
mod = 1000000007

def inp():
	return sys.stdin.readline().rstrip('\r\n')

def out(var):
	sys.stdout.write(str(var))

def lis():
	return list(map(int, inp().split()))

def stringlis():
	return list(map(str, inp().split()))

def sep():
	return map(int, inp().split())

def strsep():
	return map(str, inp().split())

def zerolist(n):
	return [0] * n

def nextline():
	out('\n')

def testcase(t):
	for p in range(t):
		solve()

def printlist(a):
	for p in range(0, len(a)):
		out(str(a[p]) + ' ')

def lcm(a, b):
	return a * b // gcd(a, b)

def power(a, b):
	ans = 1
	while b > 0:
		if b % 2 == 1:
			ans *= a
		a *= a
		b //= 2
	return ans

def ncr(n, r):
	return factorial(n) // (factorial(r) * factorial(max(n - r, 1)))

def isPrime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	i = 5
	while i * i <= n:
		if n % i == 0 or n % (i + 2) == 0:
			return False
		i = i + 6
	return True

def solve():
	(l, r, m) = sep()
	for i in range(l, r + 1):
		rem = m % i
		if r - l >= rem and m // i != 0:
			print(i, r, r - rem)
			return
		rem = i * (m // i + 1) - m
		if r - l >= rem:
			print(i, l, l + rem)
			return
testcase(int(inp()))


import sys, math
from sys import stdin, stdout
mod = int(1000000000.0 + 7)
from statistics import mode
ii1 = lambda : int(stdin.readline().strip())
is1 = lambda : stdin.readline().strip()
iia = lambda : list(map(int, stdin.readline().strip().split()))
isa = lambda : stdin.readline().strip().split()

def lcm(a, b):
	return a * b // gcd(a, b)

def setbits(n):
	return bin(n).count('1')

def resetbits(n):
	return bin(n).count('0')

def modinv(n, p):
	return pow(n, p - 2, p)

def ncr_p(n, r, p):
	(num, den) = (1, 1)
	for i in range(r):
		num = num * (n - i) % p
		den = den * (i + 1) % p
	return num * modinv(den, p) % p

def isPrime(num):
	if num <= 1:
		return False
	if num == 2 or n == 3:
		return True
	if num % 2 == 0 or num % 3 == 0:
		return False
	for i in range(5, int(num ** 0.5) + 1, 6):
		if num % i == 0 or num % (i + 2) == 0:
			return False
	return True

def bin_search(arr, low, high, val):
	while low <= high:
		mid = low + (high - low) // 2
		if arr[mid] == val:
			return mid
		elif arr[mid] < val:
			low = mid + 1
		else:
			high = mid - 1
	return -1

def sumofdigit(num):
	count = 0
	while num:
		count += num % 10
		num //= 10
	return count

def make_dic(arr):
	freq = {}
	for val in arr:
		freq[val] = freq[val] + 1 if val in freq else 1
	return freq

def inputmatrix():
	(r, c) = iia()
	mat = [0] * r
	for i in range(r):
		mat[i] = iia()
	return mat

def prefix_sum(n, arr):
	for i in range(1, n):
		arr[i] += arr[i - 1]
	return arr

def binomial(n, k):
	if 0 <= k <= n:
		ntok = 1
		ktok = 1
		for t in range(1, min(k, n - k) + 1):
			ntok *= n
			ktok *= t
			n -= 1
		return ntok // ktok
	else:
		return 0

def divisors(n):
	res = []
	for i in range(1, ceil(sqrt(n)) + 1):
		if n % i == 0:
			if i == n // i:
				res.append(i)
			else:
				res.append(i)
				res.append(n // i)
	return res
for _ in range(ii1()):
	(l, r, m) = iia()
	diff = abs(r - l)
	for i in range(l, r + 1):
		if m // i == 0:
			if i - m % i <= diff:
				modulo = i - m % i
				print(i, l, l + modulo)
				break
		if m // i > 0:
			if m % i <= diff:
				modulo = m % i
				print(i, l + modulo, l)
				break
			elif i - m % i <= diff:
				modulo = i - m % i
				print(i, l, l + modulo)
				break


t = int(input())
for T in range(t):
	(l, r, m) = input().split()
	l = int(l)
	r = int(r)
	m = int(m)
	(a, b, c) = (0, 0, 0)
	for i in range(l, r + 1):
		if m % i >= 0 and m % i <= r - l:
			a = i
			(b, c) = (r, r - m % i)
			if m - m % i > 0:
				break
		if (m // i + 1) * i - m <= r - l:
			a = i
			(b, c) = (r - ((m // i + 1) * i - m), r)
			break
	print(a, b, c)


from math import ceil
for _ in range(int(input())):
	(l, r, m) = map(int, input().split())
	ok1 = m + r - l
	for i in range(l, r + 1):
		ok2 = ok1 % i
		if ok2 <= (r - l) * 2:
			print(i, end=' ')
			ok2 -= r - l
			if ok2 >= 0:
				print(r, r - ok2)
			else:
				print(l, l - ok2)
			break


for _ in range(int(input())):
	(l, r, m) = map(int, input().split())
	dif = r - l
	for a in range(l, r + 1):
		if m % a <= dif and m // a > 0:
			b = r
			c = r - m % a
			break
		elif m % a + dif >= a:
			c = r
			b = r - (a - m % a)
			break
	print(a, b, c)


import sys
import math

def II():
	return int(sys.stdin.readline())

def LI():
	return list(map(int, sys.stdin.readline().split()))

def MI():
	return map(int, sys.stdin.readline().split())

def SI():
	return sys.stdin.readline().strip()
t = II()
for q in range(t):
	(l, r, m) = MI()
	for i in range(l, r + 1):
		if m >= i:
			if m % i <= r - l:
				print(i, l + m % i, l)
				break
			elif i - m % i <= r - l:
				print(i, l, l + i - m % i)
				break
		else:
			print(i, l, l + i - m % i)
			break


import sys
input = sys.stdin.readline
I = lambda : list(map(int, input().split()))
(t,) = I()
for _ in range(t):
	(l, r, m) = I()
	a = b = c = 0
	for i in range(l, r + 1):
		if i <= m:
			aa = i
			q = m % aa
			p = m // aa * aa + aa - m
			(bb, cc) = (l, l + p)
			if min(aa, bb, cc) >= l and max(aa, bb, cc) <= r:
				(a, b, c) = (aa, bb, cc)
				break
			(bb, cc) = (l + q, l)
			if min(aa, bb, cc) >= l and max(aa, bb, cc) <= r:
				(a, b, c) = (aa, bb, cc)
				break
		else:
			aa = i
			p = i - m
			(bb, cc) = (l, l + p)
			if min(aa, bb, cc) >= l and max(aa, bb, cc) <= r:
				(a, b, c) = (aa, bb, cc)
				break
	print(a, b, c)


import math

def check(l, r, m, a, b, c):
	assert l <= min(a, b, c) <= r and l <= max(a, b, c) <= r and ((m - b + c) % a == 0)

def brute(l, r, m):
	if m <= r - l:
		return (l, l, abs(2 * l - m))
	for d in range(l, r + 1):
		if m % d == 0:
			return (d, l, l)
		n = m // d
		if -n * d % m <= r - l:
			return (d, l + -n * d % m, l)
		if n * d < m:
			n += 1
		if n * d % m <= r - l:
			return (d, l, l + n * d % m)
	return None

def main():
	t = int(input())
	for _ in range(t):
		(l, r, m) = [int(x) for x in input().split()]
		result = brute(l, r, m)
		print(' '.join((str(x) for x in result)))
main()


t = int(input())
while t:
	t = t - 1
	(l, r, m) = map(int, input().split())
	diff = r - l
	a = -1
	b = -1
	c = -1
	for i in range(l, r + 1):
		j = m % i
		k = i - j
		if j <= diff and i <= m:
			a = i
			b = l + j
			c = l
			break
		elif k <= diff:
			a = i
			b = l
			c = l + k
			break
	print(a, b, c)


for _ in range(int(input())):
	(l, r, m) = list(map(int, input().split()))
	mn = l - r
	mex = r - l
	f = 0
	for i in range(l, r + 1):
		x = m % i
		(p, q) = (-x, i - x)
		if p >= mn and p <= mex:
			(a, b, c) = (i, l - p, l)
			y = (m + (c - b)) // a
			if y > 0:
				f = 1
				break
		if q >= mn and q <= mex:
			(a, b, c) = (i, l, l + q)
			y = (m + (c - b)) // a
			if y > 0:
				f = 1
				break
	if f == 1:
		print(a, b, c)


from math import ceil
for _ in range(int(input())):
	(l, r, m) = map(int, input().split())
	d = r - l
	t = m - d
	a = l
	while a <= r:
		p = max(1, ceil(t / a))
		z = m - a * p
		if abs(z) <= d:
			if z < 0:
				c = abs(z)
				b = 0
			else:
				c = 0
				b = abs(z)
			print(a, b + l, c + l)
			break
		a += 1


T = int(input())
for _ in range(T):
	(L, R, M) = [int(x) for x in input().split(' ')]
	for a in range(L, R + 1):
		lo = M // a * a
		hi = lo + a
		if lo != 0 and M - lo <= R - L:
			print(a, L + M - lo, L)
			break
		if hi - M <= R - L:
			print(a, L, L + hi - M)
			break


t = int(input())
for _ in range(t):
	(l, r, m) = map(int, input().split())
	f = False
	for a in range(l, r + 1):
		(n1, n2) = (m // a, -(-m // a))
		if l - r <= m - n1 * a <= r - l:
			for c in range(l, r + 1):
				b = m - n1 * a + c
				if l <= b <= r:
					if m + c - b != 0:
						print(a, b, c)
						f = True
						break
		if f:
			break
		if l - r <= m - n2 * a <= r - l:
			for c in range(l, r + 1):
				b = m - n2 * a + c
				if l <= b <= r:
					if m + c - b != 0:
						print(a, b, c)
						f = True
						break
		if f:
			break


from sys import stdin
input = lambda : stdin.readline().strip()
from math import ceil, sqrt, factorial, gcd, log
from collections import deque
from bisect import bisect_left, bisect_right
for _ in range(int(input())):
	(l, r, m) = map(int, input().split())
	c = l
	t = r - l
	for i in range(l, r + 1):
		z = m % i
		if z <= t and m - z != 0:
			print(i, c + z, c)
			break
		else:
			z = i - z
			if z <= t and m + z != 0:
				print(i, l, l + z)
				break


def ans(n, i):
	if n == 0:
		return False
	k = m - n * i
	a = i
	if abs(k) > r - l:
		return False
	if k > 0:
		c = l
		b = l + k
		return [a, b, c]
	else:
		c = r
		b = r - abs(k)
		return [a, b, c]
for tt in range(int(input())):
	(l, r, m) = map(int, input().split())
	a = -1
	b = -1
	c = -1
	fg = 0
	for i in range(l, r + 1):
		if m % i == 0:
			a = i
			b = l
			c = l
			n = m // i
			fg = 1
			print(a, b, c)
			break
		else:
			n = m // i
			if ans(n, i):
				l1 = ans(n, i)
				print(l1[0], l1[1], l1[2])
				break
			if ans(n + 1, i):
				l1 = ans(n + 1, i)
				print(l1[0], l1[1], l1[2])
				break


from math import *
from bisect import *
from collections import Counter, defaultdict, deque
I = lambda : int(input())
M = lambda : map(int, input().split())
LI = lambda : list(map(int, input().split()))
for _ in range(I()):
	(l, r, m) = M()
	c = r - l
	if m < l:
		print(l, l, l + (l - m))
	else:
		for i in range(l, r + 1):
			if m % i + c >= i:
				print(i, l, l + (i - m % i))
				break
			elif m % i <= c:
				print(i, l + m % i, l)
				break


def go(l, r, m):
	for a in range(l, r + 1):
		f = max(0, m + l - r)
		if (m + l - r) % a != 0:
			f = (f // a + 1) * a
		to = m - l + r
		if to % a != 0:
			to = (to // a + 1) * a
		for i in range(to, f - 1, -a):
			if i % a != 0:
				continue
			n = i // a
			if n <= 0:
				continue
			b = l
			c = i - m + b
			if l <= c and c <= r:
				print(a, b, c)
				return
			b = r
			c = i - m + b
			if l <= c and c <= r:
				print(a, b, c)
				return
t = int(input())
for _ in range(t):
	(l, r, m) = map(int, input().split())
	go(l, r, m)


def function(l, r, m):
	x = m + l - r
	y = m + r - l
	for a in range(l, r + 1):
		q = y - y % a
		if q >= x:
			if q >= m:
				diff = q - m
				c = r
				b = r - diff
			else:
				diff = m - q
				b = r
				c = r - diff
			return f'{a} {b} {c}'
t = int(input())
for k in range(t):
	nums = list(map(int, input().rstrip().split()))
	l = nums[0]
	r = nums[1]
	m = nums[2]
	print(function(l, r, m))


t = int(input())
lstA = []
lstB = []
lstC = []
for i in range(t):
	(l, r, m) = [int(q) for q in input().split()]
	if r - l >= m % l and (m - m % l) // l > 0:
		a = l
		b = r
		c = r - m % l
	elif r - l >= abs(m % l - l) and (m - (r + m % l - l) + r) // l > 0:
		a = l
		b = r + m % l - l
		c = r
	elif r - l >= m % r and (m - r + r - m % r) // r > 0:
		a = r
		b = r
		c = r - m % r
	elif r - l >= abs(m % r - r) and (m - (r + m % r - r) + r) // r > 0:
		a = r
		b = r + m % r - r
		c = r
	else:
		for i in range(l + 1, r):
			if r - i >= m % i and (m - r + r - m % i) // i > 0:
				a = i
				b = r
				c = r - m % i
				break
			elif r - i >= abs(m % i - i) and (m - (r + m % i - i) + r) // i > 0:
				a = i
				b = r + m % i - i
				c = r
				break
			else:
				continue
	lstA.append(a)
	lstB.append(b)
	lstC.append(c)
for i in range(t):
	print(lstA[i], lstB[i], lstC[i])


for t in range(int(input())):
	(l, r, m) = map(int, input().split())
	if l < m:
		for i in range(l, r + 1):
			rem = m % i
			rem1 = i - rem
			if r - rem >= l:
				a = i
				b = r
				c = r - rem
				n = (m + c - b) // a
				if n != 0:
					break
			if r - rem1 >= l:
				a = i
				b = r - rem1
				c = r
				n = (m + c - b) // a
				if n != 0:
					break
		print(a, b, c)
	else:
		print(l, r - (l - m), r)


for tc in range(int(input())):
	(l, r, m) = input().split(' ')
	(l, r, m) = (int(l), int(r), int(m))
	x = max(1, m + l - r)
	y = m + r - l - x
	a = 0
	rem = 0
	for i in range(l, r + 1):
		if -x % i <= y:
			a = i
			rem = -x % i
			break
	s = x + rem - m
	if s >= 0:
		print(a, l, l + s)
	else:
		print(a, l - s, l)


for _ in range(int(input())):
	(l, r, m) = map(int, input().split())
	ma = m + r - l
	mi = m + l - r
	for i in range(l, r + 1):
		f1 = int(ma // i)
		f2 = abs(int(-mi // i))
		if f1 >= f2:
			xx = m - f1 * i
			for cc in range(l, r + 1):
				if xx + cc <= r and xx + cc >= l:
					print(i, xx + cc, cc)
					break
			break


def cin():
	return map(int, input().split())
import collections
for t in range(int(input())):
	(l, r, m) = cin()
	n = 0
	for a in range(l, r + 1):
		if (m + r - l) // a > 0 and m + l - r <= (m + r - l) // a * a <= m - l + r:
			n = (m + r - l) // a
			break
	if m - a * n > 0:
		b = m - a * n + l
		c = l
	else:
		c = r
		b = m - a * n + r
	print(a, b, c)


import sys
t = 'abacaba'
t1 = '???????'
q = int(input())
for i in range(q):
	(l, r, m) = [int(j) for j in sys.stdin.readline().split()]
	sl = l
	while m % sl > r - l and sl - m % sl > r - l:
		sl += 1
	if m % sl <= r - l and m >= sl:
		print(sl, l + m % sl, l)
	else:
		print(sl, r - (sl - m % sl), r)


t = int(input())
for k in range(t):
	(l, r, m) = (int(i) for i in input().split())
	a = b = c = l
	while a <= r:
		d = m % a
		if r - l >= a - d:
			c = r
			b = r - a + d
			break
		if r - l >= d:
			b = r
			c = r - d
			break
		a += 1
	print(f'{a} {b} {c}')


import math
from collections import deque
import sys
sys.setrecursionlimit(10 ** 4)

def Divisors(n):
	l = []
	i = 2
	while i <= math.sqrt(n):
		if n % i == 0:
			if n // i == i:
				l.append(i)
			else:
				l.append(i)
				l.append(n // i)
		i = i + 1
	return l

def SieveOfEratosthenes(n):
	l = []
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	for p in range(2, n + 1):
		if prime[p]:
			l.append(p)
	return l

def primeFactors(n):
	l = []
	while n % 2 == 0:
		l.append(2)
		n = n / 2
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			l.append(i)
			n = n / i
	if n > 2:
		l.append(n)
	return l

def Factors(n):
	result = []
	for i in range(2, int(math.sqrt(n)) + 1):
		if n % i == 0:
			if i == n / i:
				result.append(i)
			else:
				result.append(i)
				result.append(n // i)
	result.append(1)
	return result

def maxSubArraySum(a):
	max_so_far = 0
	max_ending_here = 0
	size = len(a)
	for i in range(0, size):
		max_ending_here = max_ending_here + a[i]
		if max_so_far < abs(max_ending_here):
			max_so_far = max_ending_here
	return max_so_far

def longestsubarray(arr, n, k):
	current_count = 0
	max_count = 0
	for i in range(0, n, 1):
		if arr[i] % k != 0:
			current_count += 1
		else:
			current_count = 0
		max_count = max(current_count, max_count)
	return max_count

def main():
	(l, r, m) = list(map(int, input().split()))
	n = 0
	l1 = l
	r1 = r
	f = 1
	for a in range(l, r + 1):
		n = m // a
		if n > 0 and a * n >= m - (r - l) and (a * n <= m + (r - l)):
			bc = m - n * a
			if bc >= 0:
				b = l + bc
				c = l
			else:
				b = l
				c = l - bc
			print(a, b, c)
			return
		elif a * (n + 1) >= m - (r - l) and a * (n + 1) <= m + (r - l):
			bc = m - (n + 1) * a
			if bc >= 0:
				b = l + bc
				c = l
			else:
				b = l
				c = l - bc
			print(a, b, c)
			return
t = int(input())
for i in range(0, t):
	main()


t = int(input())
for _ in range(t):
	(l, r, m) = [int(i) for i in input().split()]
	if m > l:
		diff = -1
		a = -1
		for i in range(l, r + 1):
			n = m // i
			if m % i == 0:
				a = i
				diff = 0
				break
			else:
				(n1, n2) = (n, n + 1)
				diff1 = m - n1 * i
				diff2 = m - n2 * i
				if diff1 >= 0:
					if l + diff1 <= r:
						a = i
						diff = diff1
						break
				elif r + diff1 >= l:
					a = i
					diff = diff1
					break
				if diff2 >= 0:
					if l + diff2 <= r:
						a = i
						diff = diff2
						break
				elif r + diff2 >= l:
					a = i
					diff = diff2
					break
		if diff < 0:
			b = r + diff
			c = r
		else:
			b = l + diff
			c = l
		print(a, b, c)
	else:
		diff = l - m
		b = l
		c = l + diff
		print(l, b, c)


for h in range(int(input())):
	(l, r, m) = map(int, input().strip().split())
	a = -1
	b = -1
	c = -1
	for i in range(l, r + 1):
		if a - m % i <= r - l:
			a = i
			b = l
			c = l + a - m % i
			if l <= c <= r:
				print(a, b, c)
				break
		if m % i <= r - l:
			a = i
			b = l + m % i
			c = l
			if l <= b <= r:
				print(a, b, c)
				break


from bisect import bisect_left
import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	(l, r, m) = list(map(int, input().split()))
	diff = r - l
	for i in range(l, r + 1):
		rest = m % i
		if i > m:
			rest -= i
		if rest >= 0 and rest <= diff:
			print(i, r, r - rest)
			break
		if rest > 0:
			rest -= i
		if rest < 0 and abs(rest) <= diff:
			print(i, l, l - rest)
			break


import sys
import heapq, functools, collections
import math, random
from collections import Counter, defaultdict

def solve(l, r, m):
	console('----- solving ------')
	d = r - l
	for i in range(l, r + 1):
		remainder = m % i
		if m // i != 0:
			if 0 <= remainder <= d:
				return [i, l + remainder, l]
		remainder = i - m % i
		if 0 <= remainder <= d:
			return [i, l, l + remainder]
	return []

def console(*args):
	print('\x1b[36m', *args, '\x1b[0m', file=sys.stderr)
	return
for case_num in range(int(input())):
	(l, r, m) = list(map(int, input().split()))
	res = solve(l, r, m)
	print(' '.join([str(x) for x in res]))


def main():
	t = int(input())
	for _ in range(t):
		(l, r, m) = list(map(int, input().split()))
		for a in range(l, r + 1):
			if m % a <= r - l:
				b = l + m % a
				c = l
				n = m // a
				if n > 0:
					break
			if a - m % a <= r - l:
				c = l + a - m % a
				b = l
				n = m // a + 1
				if n > 0:
					break
		print(a, b, c)
main()


t = int(input())
for i in range(t):
	(l, r, m) = map(int, input().split())
	a = l
	if m < a:
		print(a, r - (a - m), r)
	else:
		while a <= r:
			n = m // a
			A = n * a
			if m % a <= r - l:
				print(a, r, r - m % a)
				break
			elif ((n + 1) * a - m) % a <= r - l:
				print(a, r - ((n + 1) * a - m), r)
				break
			else:
				a = a + 1


import math
t = int(input())
for i in range(t):
	(l, r, m) = list(map(int, input().split()))
	rem = m % l
	a = l
	n = math.floor((m + r - l) / a)
	while a <= r and abs(n * a - m) > r - l:
		a += 1
		n = math.floor((m + r - l) / a)
	m -= n * a
	if m >= 0:
		c = l
		b = l + m
	else:
		b = r + m
		c = r
	print(a, ' ', b, ' ', c)


from collections import defaultdict
import sys, math
f = None
try:
	f = open('q1.input', 'r')
except IOError:
	f = sys.stdin
if 'xrange' in dir(__builtins__):
	range = xrange

def print_case_iterable(case_num, iterable):
	print('Case #{}: {}'.format(case_num, ' '.join(map(str, iterable))))

def print_case_number(case_num, iterable):
	print('Case #{}: {}'.format(case_num, iterable))

def print_iterable(A):
	print(' '.join(A))

def read_int():
	return int(f.readline().strip())

def read_int_array():
	return [int(x) for x in f.readline().strip().split(' ')]

def rns():
	a = [x for x in f.readline().split(' ')]
	return (int(a[0]), a[1].strip())

def read_string():
	return list(f.readline().strip())

def ri():
	return int(f.readline().strip())

def ria():
	return [int(x) for x in f.readline().strip().split(' ')]

def rns():
	a = [x for x in f.readline().split(' ')]
	return (int(a[0]), a[1].strip())

def rs():
	return list(f.readline().strip())

def bi(x):
	return bin(x)[2:]
from collections import deque
import math
NUMBER = 10 ** 9 + 7

def factorial(n):
	M = NUMBER
	f = 1
	for i in range(1, n + 1):
		f = f * i % M
	return f

def mult(a, b):
	return a * b % NUMBER

def minus(a, b):
	return (a - b) % NUMBER

def plus(a, b):
	return (a + b) % NUMBER

def egcd(a, b):
	if a == 0:
		return (b, 0, 1)
	else:
		(g, y, x) = egcd(b % a, a)
		return (g, x - b // a * y, y)

def modinv(a):
	m = NUMBER
	(g, x, y) = egcd(a, m)
	if g != 1:
		raise Exception('modular inverse does not exist')
	else:
		return x % m

def choose(n, k):
	if n < k:
		assert false
	return mult(factorial(n), modinv(mult(factorial(k), factorial(n - k)))) % NUMBER
from collections import deque, defaultdict
import heapq
from types import GeneratorType

def bootstrap(f, stack=[]):

	def wrappedfunc(*args, **kwargs):
		if stack:
			return f(*args, **kwargs)
		else:
			to = f(*args, **kwargs)
			while True:
				if type(to) is GeneratorType:
					stack.append(to)
					to = next(to)
				else:
					stack.pop()
					if not stack:
						break
					to = stack[-1].send(to)
			return to
	return wrappedfunc

def dfs(g, timeIn, timeOut, depths, parents):
	cnt = 0
	stack = [[1, 0, 0, 0]]
	while stack:
		(v, neig_i, parent, depth) = stack[-1]
		parents[v] = parent
		depths[v] = depth
		if neig_i == 0:
			timeIn[v] = cnt
			cnt += 1
		while neig_i < len(g[v]):
			u = g[v][neig_i]
			if u == parent:
				neig_i += 1
				continue
			stack[-1][1] = neig_i + 1
			stack.append([u, 0, v, depth + 1])
			break
		if neig_i == len(g[v]):
			stack.pop()
			timeOut[v] = cnt
			cnt += 1
cnt = 0

@bootstrap
def dfs(v, adj, timeIn, timeOut, depths, parents, parent=0, depth=0):
	global cnt
	parents[v] = parent
	depths[v] = depth
	timeIn[v] = cnt
	cnt += 1
	for u in adj[v]:
		if u == parent:
			continue
		yield dfs(u, adj, timeIn, timeOut, depths, parents, v, depth + 1)
	timeOut[v] = cnt
	cnt += 1
	yield

def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)

def lcm(a, b):
	return a * b / gcd(a, b)

def get_num_2_5(n):
	twos = 0
	fives = 0
	while n > 0 and n % 2 == 0:
		n //= 2
		twos += 1
	while n > 0 and n % 5 == 0:
		n //= 5
		fives += 1
	return (twos, fives)

def shift(a, i, num):
	for _ in range(num):
		(a[i], a[i + 1], a[i + 2]) = (a[i + 2], a[i], a[i + 1])

def equal(x, y):
	return abs(x - y) <= 1e-09

def getAngle(a, b, c):
	ang = math.degrees(math.atan2(c[1] - b[1], c[0] - b[0]) - math.atan2(a[1] - b[1], a[0] - b[0]))
	return ang + 360 if ang < 0 else ang

def getLength(a, b):
	return math.sqrt((a[0] - b[0]) ** 2 + (a[1] - b[1]) ** 2)
from heapq import heapify, heappush, heappop

def bfs(adj):
	s = set()
	d = defaultdict(set)
	q = deque([])
	s.add(0)
	d[0].add(0)
	q.append((0, 0))
	while len(q) > 0:
		(v, depth) = q.popleft()
		for u in adj[v]:
			if u not in s:
				s.add(u)
				d[depth + 1].add(u)
				q.append((u, depth + 1))
	return d

def dfs(u, top, adj, vis):
	vis[u] = 1
	for (v, d) in adj[u]:
		if vis[v] == 2 or d == 0:
			continue
		if vis[v] == 1:
			return 'No'
		if dfs(v, top, adj, vis) == 'No':
			return 'No'
	vis[u] = 2
	top.append(u)

def solution(l, r, m):
	for x in range(l, r + 1):
		top = x * ((m + x - 1) // x)
		diff = top - m
		if r - l >= diff:
			return f'{x} {l} {l + diff}'
		bot = x * (m // x)
		diff = m - bot
		if r - l >= diff:
			return f'{x} {l + diff} {l}'

def main():
	T = 1
	T = ri()
	for i in range(T):
		(l, r, m) = ria()
		x = solution(l, r, m)
		if 'xrange' not in dir(__builtins__):
			print(x)
		else:
			(print >> output, str(x))
	if 'xrange' in dir(__builtins__):
		print(output.getvalue())
		output.close()
if 'xrange' in dir(__builtins__):
	import cStringIO
	output = cStringIO.StringIO()
main()


from sys import stdin
for _ in range(int(stdin.readline())):
	(l, r, m) = map(int, stdin.readline().split())
	upp = (m - (r - l), m + (r - l))
	for i in range(l, r + 1):
		if not upp[0] % i and upp[0]:
			x = upp[0] // i
			a = i
			break
		elif not upp[1] % i:
			x = upp[1] // i
			a = i
			break
		elif upp[0] // i != upp[1] // i:
			x = upp[1] // i
			a = i
			break
	x *= a
	x -= m
	if x < 0:
		c = l
		b = l - x
	else:
		b = l
		c = l + x
	print(a, b, c)


def solve():
	(l, r, m) = map(int, input().split())
	a = l
	md = m % a
	imd = a - md
	for i in range(l, r + 1):
		k = m % i
		if k < min(md, imd) or i - k < min(md, imd):
			a = i
			md = m % i
			imd = a - md
	diff = 0
	if m < a:
		diff = m - a
	elif imd < md:
		diff = -imd
	else:
		diff = md
	(b, c) = (-1, -1)
	if diff < 0:
		b = l
		c = l - diff
	else:
		c = l
		b = l + diff
	print(a, b, c)
for _ in range(int(input())):
	solve()


from math import ceil, floor

def find(l, r, m):
	k = abs(r - l)
	for a in range(l, r + 1):
		n = (m + k) // a
		if m - k <= n * a and n * a <= m + k:
			break
	d = m - n * a
	if d < 0:
		(b, c) = (r + d, r)
	else:
		(b, c) = (l + d, l)
	return (a, b, c)

def main():
	t = int(input())
	for _ in range(t):
		(l, r, m) = map(int, input().split())
		res = find(l, r, m)
		print(*res)
main()


t = int(input())
for _ in range(t):
	(l, r, m) = map(int, input().split())
	dif = r - l
	for i in range(l, r + 1):
		t = m % i
		if t == 0:
			print(i, l, l)
			break
		elif i - t <= dif:
			print(i, r - i + t, r)
			break
		elif m > i and t <= dif:
			print(i, r, r - t)
			break


def f():
	(l, r, m) = map(int, input().split())
	ans = [0, 0, 0, 0]
	for i in range(l, r + 1):
		n = m // i
		if n > 0:
			d = m - n * i
			if d <= r - l:
				ans = [n, i, r, r - d]
				break
		n += 1
		d1 = n * i - m
		if d1 <= r - l:
			ans = [n, i, r - d1, r]
			break
		j = r - (i - l)
		n = m // j
		if n > 0:
			d = m - n * j
			if d <= r - l:
				ans = [n, j, r, r - d]
				break
		n += 1
		d1 = n * j - m
		if d1 <= r - l:
			ans = [n, j, r - d1, r]
			break
	print(ans[1], ans[2], ans[3])
t = int(input())
for j in range(t):
	f()


TC = int(input())
while TC:
	(l, r, m) = list(map(int, input().split()))
	minimum = l
	ranges = r - l
	while l <= r:
		a = l
		mod = -1 * (m % a)
		xMod = a - m % a
		if xMod <= ranges:
			b = minimum
			c = minimum + xMod
			print(a, b, c)
			break
		elif abs(mod) <= ranges:
			c = minimum
			b = minimum + abs(mod)
			if m - (b - c) != 0:
				print(a, b, c)
				break
		l += 1
	TC -= 1


def f(num):
	x = m // num
	return x * num

def s(num):
	x = (m - 1) // num + 1
	return x * num

def calc(num):
	x = l
	y = l + abs(num)
	if num > 0:
		return (y, x)
	return (x, y)
for nt in range(int(input())):
	(l, r, m) = map(int, input().split())
	for i in range(l, r + 1):
		first = f(i)
		second = s(i)
		if first and abs(m - first) <= r - l:
			ans = [i, first]
			break
		if abs(m - second) <= r - l:
			ans = [i, second]
			break
	diff = m - ans[1]
	(b, c) = calc(diff)
	print(ans[0], b, c)


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	(l, r, m) = map(int, input().split())
	dif = r - l + 1
	ans = [0, 0, 0]
	for i in range(l, r + 1):
		a = i
		u = m % a
		uu = a - m % a
		if u <= dif:
			b = r
			c = b - u
			if m + c - b > 0 and l <= c <= r:
				ans = [a, b, c]
				break
		if uu <= dif:
			c = r
			b = c - uu
			if m + c - b > 0 and l <= b <= r:
				ans = [a, b, c]
				break
	print(*ans)


import os
import sys
from math import *
from collections import *
from fractions import *
from bisect import *
from heapq import *
from io import BytesIO, IOBase

def vsInput():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def value():
	return tuple(map(int, input().split()))

def array():
	return [int(i) for i in input().split()]

def Int():
	return int(input())

def Str():
	return input()

def arrayS():
	return [i for i in input().split()]
for _ in range(Int()):
	(l, r, m) = value()
	d = r - l
	for a in range(l, r + 1):
		rem = m % a
		if rem <= d:
			c = l
			b = l + rem
			if m != b - c:
				break
		rem = a - rem
		if rem <= d:
			b = l
			c = l + rem
			if m != b - c:
				break
	print(a, b, c)


from sys import stdin, stdout

def single_input(which_type=int):
	return which_type(stdin.readline().strip())

def map_input(which_type=int):
	return map(which_type, stdin.readline().strip().split())

def list_input(which_type=int):
	return list(map_input(which_type))

def flush(value, delimiter='\n'):
	stdout.write(str(value) + delimiter)
	return

def run():
	t = single_input()
	for _ in range(t):
		(l, r, m) = map_input()
		max_diff = r - l
		for i in range(l, r + 1):
			temp1 = m % i
			temp2 = i - m % i
			if temp1 <= max_diff:
				if m < l:
					flush('{} {} {}'.format(i, l, 2 * l - temp1))
				else:
					flush('{} {} {}'.format(i, l + temp1, l))
				break
			if temp2 <= max_diff:
				if m < l:
					flush('{} {} {}'.format(i, l + temp2, l))
				else:
					flush('{} {} {}'.format(i, l, l + temp2))
				break
	return
run()