You are playing a very popular game called Cubecraft. Initially, you have one stick and want to craft $k$ torches. One torch can be crafted using one stick and one coal.

Hopefully, you've met a very handsome wandering trader who has two trade offers:  exchange $1$ stick for $x$ sticks (you lose $1$ stick and gain $x$ sticks).  exchange $y$ sticks for $1$ coal (you lose $y$ sticks and gain $1$ coal). 

During one trade, you can use only one of these two trade offers. You can use each trade offer any number of times you want to, in any order.

Your task is to find the minimum number of trades you need to craft at least $k$ torches. The answer always exists under the given constraints.

You have to answer $t$ independent test cases.


-----Input-----

The first line of the input contains one integer $t$ ($1 \le t \le 2 \cdot 10^4$) — the number of test cases. Then $t$ test cases follow.

The only line of the test case contains three integers $x$, $y$ and $k$ ($2 \le x \le 10^9$; $1 \le y, k \le 10^9$) — the number of sticks you can buy with one stick, the number of sticks required to buy one coal and the number of torches you need, respectively.


-----Output-----

For each test case, print the answer: the minimum number of trades you need to craft at least $k$ torches. The answer always exists under the given constraints.


-----Example-----
Input
5
2 1 5
42 13 24
12 11 12
1000000000 1000000000 1000000000
2 1000000000 1000000000

Output
14
33
25
2000000003
1000000001999999999

Source: codeforces | Difficulty: EASY
Tags: Mathematics


Solutions:
res = []
for x in range(int(input())):
	(a, b, c) = map(int, input().split())
	Reqsticks = c * (b + 1) - 1
	i = Reqsticks // (a - 1) + (Reqsticks % (a - 1) > 0)
	total = i + c
	res.append(total)
for c in res:
	print(c)


import math as m

def solve():
	(x, y, k) = map(int, input().split())
	s = 1
	src = y * k
	tsr = src + k
	diff = x - 1
	count = 0
	p = tsr - 1
	a = p // diff
	if p % diff != 0:
		a += 1
	a += k
	return a
for _ in range(int(input())):
	print(solve())


import sys
import os
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')
mod = 10 ** 9 + 7

def lcm(x, y):
	return x * y / gcd(x, y)

def fact(x, mod=mod):
	ans = 1
	for i in range(1, x + 1):
		ans = ans * i % mod
	return ans

def arr2D(n, m, default=0):
	lst = []
	for i in range(n):
		temp = [default] * m
		lst.append(temp)
	return lst

def sortDictV(x):
	return {k: v for (k, v) in sorted(x.items(), key=lambda item: item[1])}
from math import floor, ceil
from decimal import Decimal as d

def solve(x, y, k):
	x -= 1
	return ceil(d(k * y + k - 1) / x) + k
for _ in range(int(input())):
	(x, y, k) = list(map(int, input().split()))
	print(solve(x, y, k))


from io import BytesIO, IOBase
import sys, os
inpl = lambda : list(map(int, input().split()))
inpm = lambda : map(int, input().split())
inpi = lambda : int(input())
inp = lambda : input()
(rev, ra, l) = (reversed, range, len)
P = print
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 input():
	return sys.stdin.readline().rstrip('\r\n')
from bisect import bisect_left as bl
from bisect import bisect_right as br
import sys, operator, math, operator
from collections import Counter
tc = inpi()
while tc:
	(x, y, k) = inpm()
	tot = k + k * y
	tot -= 1
	ans = tot // (x - 1) + k
	if tot % (x - 1) != 0:
		ans += 1
	P(ans)
	tc -= 1


for i in range(int(input())):
	(x, y, k) = map(int, input().split())
	print(((y + 1) * k - 1 + x - 2) // (x - 1) + k)


import sys
from functools import reduce
from collections import Counter
import time
import datetime
from math import sqrt, gcd

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

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

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

def mips():
	return map(str, sys.stdin.readline().split())

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

def matip(n, m):
	lst = []
	for i in range(n):
		arr = lip()
		lst.append(arr)
	return lst

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

def minJumps(arr, n):
	jumps = [0 for i in range(n)]
	if n == 0 or arr[0] == 0:
		return float('inf')
	jumps[0] = 0
	for i in range(1, n):
		jumps[i] = float('inf')
		for j in range(i):
			if i <= j + arr[j] and jumps[j] != float('inf'):
				jumps[i] = min(jumps[i], jumps[j] + 1)
				break
	return jumps[n - 1]

def dic(arr):
	return Counter(arr)

def check_prime(n):
	if n < 2:
		return False
	for i in range(2, int(n ** 0.5) + 1, 2):
		if n % i == 0:
			return False
	return True
t = ip()
while t:
	t -= 1
	(x, y, k) = mip()
	count = (k * (y + 1) - 2) // (x - 1)
	count += k
	count += 1
	print(count)


import math
for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	sticks = k + y * k
	if (sticks - 1) % (x - 1) == 0:
		print((sticks - 1) // (x - 1) + k)
	else:
		print((sticks - 1) // (x - 1) + 1 + k)


import sys

def onemore(n, m):
	if n % m:
		return 1
	else:
		return 0
T = int(sys.stdin.readline())
for _ in range(T):
	(x, y, k) = map(int, sys.stdin.readline().split())
	print((k * y + k - 1) // (x - 1) + onemore(k * y + k - 1, x - 1) + k)


from functools import reduce
import collections
import math
import sys

class Read:

	@staticmethod
	def string():
		return input()

	@staticmethod
	def int():
		return int(input())

	@staticmethod
	def list(delimiter=' '):
		return input().split(delimiter)

	@staticmethod
	def list_int(delimiter=' '):
		return list(map(int, input().split(delimiter)))

def main():
	t = Read.int()
	for _ in range(t):
		(x, y, k) = Read.list_int()
		if (y * k + k - 1) % (x - 1) == 0:
			print((y * k + k - 1) // (x - 1) + k)
		else:
			print((y * k + k - 1) // (x - 1) + 1 + k)
main()


n = int(input())
for i in range(n):
	(x, y, k) = map(int, input().split(' '))
	out = k
	w = k * y + k - 1
	d = x - 1
	out += (w + d - 1) // d
	print(out)


import math
t = int(input())
while t > 0:
	raw = input().split(' ')
	x = int(raw[0])
	y = int(raw[1])
	k = int(raw[2])
	res = math.ceil((y * k - 1) / (x - 1))
	sticks = 1 + res * (x - 1) - k * y
	res += k
	if k > sticks:
		res += math.ceil((k - sticks) / (x - 1))
	print(res)
	t -= 1


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 solve():
	(x, y, k) = read()
	rhs = k + k * y
	rhs -= 1
	val = (0 - rhs) // (x - 1)
	print(-val + k)
for _ in range(int(input())):
	solve()


import math
t = int(input())
for i in range(t):
	(x, y, k) = map(int, input().split())
	s2 = k
	s1 = (k * (y + 1) - 1 + x - 2) // (x - 1)
	print(s1 + s2)


cases = []
temp = []
t = int(input())
for i in range(t):
	newarr = [int(x) for x in input().split()]
	cases.append(newarr)
for case in cases:
	x = case[0]
	y = case[1]
	k = case[2]
	tstick = k + k * y
	strade = (tstick - 1) // (x - 1)
	if (tstick - 1) % (x - 1) != 0:
		strade += 1
	total = strade + k
	print(total)


import sys, collections
tc = int(sys.stdin.readline())
for _ in range(tc):
	(x, y, k) = map(int, sys.stdin.readline().split())
	now = 1
	times = 0
	if k * y % (x - 1) == 0:
		times = k * y // (x - 1)
	else:
		times = k * y // (x - 1) + 1
	left_sticks = times * (x - 1) + 1
	left_sticks -= k * y
	target_sticks = k - left_sticks
	if target_sticks % (x - 1) == 0:
		times += target_sticks // (x - 1)
	else:
		times += target_sticks // (x - 1) + 1
	print(times + k)


import math
t = int(input())
for p in range(t):
	(x, y, k) = map(int, input().split())
	ans = 0
	ans += math.ceil(y * k / (x - 1))
	sticks = 1 + ans * (x - 1) - y * k
	ans += k
	ans += math.ceil((k - sticks) / (x - 1))
	print(ans)


for s in [*open(0)][1:]:
	(x, y, k) = map(int, s.split())
	print(k - (1 - y * k - k) // (x - 1))


from sys import stdin, stdout

def divide(num1, num2):
	if num1 % num2 == 0:
		return num1 // num2
	else:
		return num1 // num2 + 1
outputs = []
t = int(stdin.readline().strip())
for __ in range(t):
	(x, y, k) = map(int, stdin.readline().strip().split())
	trades = k
	sticks_req = k + y * k
	trades += (sticks_req - x) // (x - 1) + 1 if (sticks_req - x) % (x - 1) == 0 else (sticks_req - x) // (x - 1) + 2
	outputs.append(trades)
for o in outputs:
	print(o)


import sys
import math as mt
import collections as cc
import sys
import itertools as it
I = lambda : list(map(int, input().split()))
for tc in range(int(input())):
	(x, y, k) = I()
	tot = k + k * y
	ans = (tot + x - 3) // (x - 1)
	print(ans + k)


import sys

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

def mint():
	return int(minp())

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

def solve():
	(x, y, k) = mints()
	ta = k * (y + 1)
	d = (ta - 1 + (x - 2)) // (x - 1)
	print(d + k)
for i in range(mint()):
	solve()


t = int(input())
for _ in range(t):
	(x, y, k) = map(int, input().split())
	print((k + k * y - 2) // (x - 1) + 1 + k)


t = int(input())
for tests in range(t):
	(x, y, k) = map(int, input().split())
	r = 0
	n = k + k * y
	now = 1
	r = (n - 1) // (now * x - 1) + (1 if (n - 1) % (now * x - 1) > 0 else 0)
	print(k + r)


for i in range(int(input())):
	(x, y, k) = [int(i) for i in input().split()]
	v = int((k * (y + 1) - 1) // (x - 1))
	if 1 + v * (x - 1) >= k * (y + 1):
		a = 0
	else:
		a = 1
	print(v + k + a)


import sys
import math

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

def iinput():
	return int(input())

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

def get_list():
	return list(map(int, sys.stdin.readline().strip().split()))
mod = int(1000000000.0) + 7
for _ in range(iinput()):
	(x, y, k) = rinput()
	n = (k * (y + 1) - 1) // (x - 1) + 1
	an = 1 + (n - 1) * (x - 1)
	if an >= k * (y + 1):
		print(int(n + k - 1))
	else:
		print(int(n + k))


q = int(input())
while q:
	q -= 1
	(x, y, k) = map(int, input().split())
	l = 0
	r = 10 ** 20
	while r - l > 1:
		m = (r + l) // 2
		cur = 1 + m * (x - 1)
		ok = True
		if k > cur - y * k or cur - y * k <= 0:
			ok = False
		if ok:
			r = m
		else:
			l = m
	print(r + k)


for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	coal = y * k
	n = 1
	if (k + coal - x) % (x - 1) == 0:
		n = (k + coal - x) // (x - 1) + 1
	else:
		n = (k + coal - x) // (x - 1) + 2
	print(n + k)


def solve():
	(x, y, k) = map(int, input().split())
	ans = k * (x + y) - 1
	ans = ans // (x - 1) if ans % (x - 1) == 0 else ans // (x - 1) + 1
	print(ans)
for _ in range(int(input())):
	solve()


l = []
for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	s = y * k + k - x
	n = s // (x - 1)
	if s % (x - 1) == 0:
		l.append(1 + k + s // (x - 1))
	else:
		l.append(2 + k + n)
for i in l:
	print(i)


from math import ceil
for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	print(k + (k * y + k - 1 + x - 2) // (x - 1))


def result():
	arr = list(map(int, input().split()))
	x = arr[0]
	y = arr[1]
	k = arr[2]
	s = 1
	count = 0
	stick = y * k + k
	s = x
	count = 1
	flag = (stick - x) // (x - 1)
	s = s + flag * (x - 1)
	if (stick - x) % (x - 1) == 0:
		count = count + flag
	else:
		count = count + flag + 1
	count = count + k
	print(count)
t = int(input())
while t > 0:
	result()
	t = t - 1


for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	print((k + k * y - 3 + x) // (x - 1) + k)


for _ in range(int(input())):
	(x, y, k) = list(map(int, input().split()))
	tottrades = (k + k * y - 1) // (x - 1)
	rem = min(1, (k + k * y - 1) % (x - 1))
	tottrades += k + rem
	print(tottrades)


num = int(input())
a = []
for i in range(num):
	(x, y, k) = map(int, input().split())
	a.append(int(y * k + k - 1 + x - 2) // (x - 1) + k)
for i in range(num):
	print(a[i])


for test in range(int(input())):
	vstup = list(map(int, input().split(' ')))
	print(-(-((vstup[1] + 1) * vstup[2] - 1) // (vstup[0] - 1)) + vstup[2])


import math
t = int(input())
while t > 0:
	(x, y, k) = map(int, input().split())
	x_temp = 1
	y_temp = 0
	ans = k
	if ((y + 1) * k - 1) % (x - 1) == 0:
		ans += ((y + 1) * k - 1) // (x - 1)
	else:
		ans += ((y + 1) * k - 1) // (x - 1) + 1
	print(ans)
	t -= 1


n = int(input())
for k in range(n):
	s = input()
	ls = [int(x) for x in s.split()]
	if (ls[2] * ls[1] + ls[2] - 1) % (ls[0] - 1) == 0:
		ans = (ls[2] * ls[1] + ls[2] - 1) // (ls[0] - 1) + ls[2]
	else:
		ans = (ls[2] * ls[1] + ls[2] - 1) // (ls[0] - 1) + ls[2] + 1
	print(ans)


import math
for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	sticks = k - 1 + y * k
	diff = x - 1
	ans = k - (1 - y * k - k) // (x - 1)
	print(ans)


for i in range(int(input())):
	(a, b, c) = list(map(int, input().split(' ')))
	x = c * b + c - 1
	if x % (a - 1) == 0:
		print(x // (a - 1) + c)
	else:
		print(x // (a - 1) + 1 + c)


t = int(input())
for _ in range(t):
	lis = list(map(int, input().split()))
	x = lis[0]
	y = lis[1]
	k = lis[2]
	tx = (k * (y + 1) - 1 + x - 2) // (x - 1)
	ty = k
	ans = tx + ty
	print(ans)


import math
t = int(input())
while t:
	t = t - 1
	(x, y, k) = map(int, input().split())
	a = k + k * y
	if (a - 1) % (x - 1):
		print(k + (a - 1) // (x - 1) + 1)
	else:
		print(k + (a - 1) // (x - 1))


import math
import sys
import collections
import bisect
input = sys.stdin.readline
flush = sys.stdout.flush
readint = lambda : int(input())
readintm = lambda : map(int, input().strip().split())
readintl = lambda : list(map(int, input().strip().split()))
readfloatm = lambda : map(float, input().strip().split())
readfloatl = lambda : list(map(float, input().strip().split()))
readstr = lambda : input().strip()
readstrl = lambda : list(input().strip())
join = lambda x, l: x.join(map(str, l))
print = lambda *x: sys.stdout.write(' '.join(map(str, x)) + '\n')
ceil = lambda x, y: (x + y - 1) // y
mod = 1000000007
for _ in range(readint()):
	(x, y, k) = readintm()
	print(ceil(k * y + k - 1, x - 1) + k)


t = int(input())
for z in range(t):
	(x, y, k) = input().split()
	x = int(x)
	y = int(y)
	k = int(k)
	count = 0
	trade1 = (k + k * y - 1 + x - 2) // (x - 1)
	count = trade1 + k
	print(count)


import sys
from collections import defaultdict
name = sys.stdin.read()
jobGrid = []
isJob = True
row = []
grid = name.split('\n')
grid = grid[:-1]
number_of_cases = int(grid[0])
for i in range(number_of_cases):
	l = list(map(int, grid[i + 1].split()))
	sticks_needed = l[-1]
	coal_needed = l[-1]
	sticks_needed += coal_needed * l[1]
	gain_rate = l[0] - 1
	times = (sticks_needed - 1) // gain_rate + coal_needed
	if (sticks_needed - 1) % gain_rate != 0:
		times += 1
	print(times)


t = int(input())
for i in range(t):
	(x, y, k) = map(int, input().split())
	ans = 0
	if (k * (y + 1) - 1) % (x - 1) == 0:
		ans += k + (k * (y + 1) - 1) // (x - 1)
	else:
		ans += k + (k * (y + 1) - 1) // (x - 1) + 1
	print(ans)


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)):
		x = q[i][0]
		y = q[i][1]
		k = q[i][2]
		sticks_needed = k + y * k
		if (sticks_needed - 1) % (x - 1) == 0:
			sticks_buy = (sticks_needed - 1) // (x - 1)
		else:
			sticks_buy = (sticks_needed - 1) // (x - 1) + 1
		print(k + sticks_buy)
main()


for i in range(int(input())):
	(x, y, k) = map(int, input().split())
	res = 0
	s = k * y + k
	x -= 1
	if s % x == 0:
		res += s // x
		if x == 1:
			res -= 1
	elif s % x == 1:
		res += s // x
	else:
		res += s // x + 1
	res += k
	print(res)


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	(x, y, k) = map(int, input().split())
	need = k + k * y
	print((need - 1) // (x - 1) + (1 if (need - 1) % (x - 1) else 0) + k)


import sys
read = sys.stdin.read
from math import ceil
from decimal import Decimal

def main():
	_ = int(input())
	m = map(int, read().split())
	for (x, y, k) in zip(m, m, m):
		print(ceil(Decimal(k + k * y - 1) / Decimal(x - 1)) + k)
main()


import sys
from copy import *
from bisect import *

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')
di = [[-1, 0], [1, 0], [0, 1], [0, -1]]

def inc(d, c, x=1):
	d[c] = d[c] + x if c in d else x

def bo(i):
	return ord(i) - ord('A')

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 xx in input().split()]

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

def pro(a):
	return reduce(lambda a, b: a * b, a)

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 isvalid(i, j):
	return 0 <= i < n and 0 <= j < m and (a[i][j] != '.')

def bo(i):
	return ord(i) - ord('a')

def graph(n, m):
	for i in range(m):
		(x, y) = mi()
		a[x].append(y)
		a[y].append(x)
t = fi()
while t > 0:
	t -= 1
	(x, y, k) = mi()
	ans = (k + k * y - 1) // (x - 1)
	if (k + k * y - 1) % (x - 1) != 0:
		ans += 1
	ans += k
	print(ans)


from math import ceil
from decimal import *
for _ in range(int(input())):
	(x, c, k) = map(int, input().split())
	total = k * c + k
	extra = x - 1
	print(ceil(Decimal(total - 1) / Decimal(extra)) + k)


from math import ceil
t = int(input())
for _ in range(t):
	(sp, cp, k) = map(int, input().split())
	tot = ((1 + cp) * k - 1) // (sp - 1)
	trades = tot + (tot * (sp - 1) < (1 + cp) * k - 1)
	trades += k
	print(trades)


from math import ceil
t = int(input())
for _ in range(t):
	(x, y, k) = list(map(int, input().split()))
	a = k * y + k - 1
	b = x - 1
	if a % b == 0:
		c = a // b
	else:
		c = a // b + 1
	print(ceil(c + k))


t = int(input())
for _ in range(t):
	(sticks, coal, k) = map(int, input().split())
	trades = (k * coal + k + sticks - 3) // (sticks - 1) + k
	print(trades)


t = int(input())
for i in range(t):
	(x, y, k) = map(int, input().split())
	sticks = k + k * y
	trades = (sticks - 1 + x - 2) // (x - 1) + k
	print(trades)


import sys
inpt = lambda : sys.stdin.readline().rstrip()
read = lambda : [int(x) for x in input().split()]
cdiv = lambda a, b: a // b + int(a % b != 0)
from math import ceil, floor
(t,) = read()
for _ in range(t):
	(x, y, k) = read()
	tot = k * (1 + y)
	print(cdiv(tot - 1, x - 1) + k)


for i in range(int(input())):
	(x, y, z) = map(int, input().split())
	w = y * z + z
	a = w // (x - 1)
	if (a - 1) * x - (a - 2) >= w:
		print(a - 1 + z)
	elif a * x - (a - 1) >= w:
		print(a + z)
	else:
		print(a + z + 1)


from sys import stdin, stdout
from math import gcd, sqrt, inf
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())
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
M = inf
for _ in range(I()):
	(x, y, k) = R()
	x -= 1
	print((k + k * y - 1 + x - 1) // x + k)


for t in range(int(input())):
	(x, y, k) = map(int, input().split())
	a = (k * y + k - 1) // (x - 1)
	if (k * y + k - 1) % (x - 1):
		a += 1
	print(a + k)


t = int(input())
for i in range(t):
	z = list(map(int, input().split()))
	x = z[0]
	y = z[1]
	k = z[2]
	palok = k * y + k - 1
	ans = 0
	ans = palok // (x - 1)
	if palok % (x - 1) != 0:
		ans += 1
	print(ans + k)


import math
t = int(input())
while t > 0:
	(x, y, k) = map(int, input().split())
	x -= 1
	rex = y * k
	ans = int(math.ceil(1.0 * rex / x))
	rem = x * ans - rex + 1
	if rem < k:
		rem = k - rem
		ans += math.ceil(1.0 * rem / x)
	ans += k
	print(ans)
	t -= 1


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())
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 smt:

	def __init__(self, l, r, arr):
		self.l = l
		self.r = r
		self.value = (1 << 31) - 1 if l < r else arr[l]
		mid = (l + r) // 2
		if l < r:
			self.left = smt(l, mid, arr)
			self.right = smt(mid + 1, r, arr)
			self.value &= self.left.value & self.right.value

	def setvalue(self, x, val):
		if self.l == self.r:
			self.value = val
			return
		mid = (self.l + self.r) // 2
		if x <= mid:
			self.left.setvalue(x, val)
		else:
			self.right.setvalue(x, val)
		self.value = self.left.value & self.right.value

	def ask(self, l, r):
		if l <= self.l and r >= self.r:
			return self.value
		val = (1 << 31) - 1
		mid = (self.l + self.r) // 2
		if l <= mid:
			val &= self.left.ask(l, r)
		if r > mid:
			val &= self.right.ask(l, r)
		return val

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):
	res = []
	for (ch, g) in groupby(it):
		res.append((ch, len(list(g))))
	return res

class DLN:

	def __init__(self, val):
		self.val = val
		self.pre = None
		self.next = None
t = N()
for i in range(t):
	(x, y, k) = RL()
	ans = ((y + 1) * k + x - 3) // (x - 1) + k
	print(ans)


import math
from decimal import *
t = int(input())
for i in range(t):
	s = input().split(' ')
	x = int(s[0])
	y = int(s[1])
	k = int(s[2])
	print(k + math.ceil(Decimal(k * y + k - 1) / Decimal(x - 1)))


for t in range(int(input())):
	(a, b, c) = map(int, input().split())
	ans = (b * c + c - a) // (a - 1)
	re = (b * c + c - a) % (a - 1)
	if re == 0:
		print(ans + 1 + c)
	else:
		print(ans + 2 + 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):
	(x, y, k) = MI()
	ans = 0
	se = k * y + k - 1
	ans = se // (x - 1)
	ans += 1 if se % (x - 1) > 0 else 0
	print(ans + k)


def solve():
	(x, y, k) = map(int, input().split())
	lo = 0
	hi = 2 * 10 ** 18
	ans = -1
	while lo <= hi:
		md = (lo + hi) // 2
		if 1 + (x - 1) * md >= k * (1 + y):
			ans = md + k
			hi = md - 1
		else:
			lo = md + 1
	print(ans)
t = int(input())
for _ in range(t):
	solve()


for Case in ' ' * int(input()):
	(x, y, k) = map(int, input().split())
	print((y * k + k - 2) // (x - 1) + 1 + k)


t = int(input())
for test in range(t):
	(x, y, k) = [int(i) for i in input().split(' ')]
	if (k + y * k - 1) % (x - 1) == 0:
		res = int((k + y * k - 1) // (x - 1))
	else:
		res = int((k + y * k - 1) // (x - 1)) + 1
	print(res + k)


n = int(input())
for _ in range(0, n):
	(x, y, k) = [int(i) for i in input().split()]
	x -= 1
	a = k * (y + 1) - 1
	b = a // x
	c = int(a % x > 0)
	print(b + c + k)


t = int(input())
for _ in range(t):
	(x, y, k) = map(int, input().split())
	stick = 1
	coal = 0
	limit = y * k
	moves = 0
	moves = (limit - 1 + x - 2) // (x - 1)
	stick = 1 + moves * (x - 1)
	stick -= limit
	moves += k
	if stick == 0:
		moves += 1
		stick += x - 1
	moves += (k - stick + x - 2) // (x - 1)
	print(moves)


t = int(input())
for _ in range(t):
	(x, y, k) = map(int, input().split())
	result = 0
	result += (y * k + k - 1) // (x - 1) + bool((y * k + k - 1) % (x - 1))
	result += k
	print(result)


import sys
import math
fileoperation = 0
if fileoperation:
	orig_stdout = sys.stdout
	orig_stdin = sys.stdin
	inputfile = open('W:/Competitive Programming/input.txt', 'r')
	outputfile = open('W:/Competitive Programming/output.txt', 'w')
	sys.stdin = inputfile
	sys.stdout = outputfile
mod = 1000000007

def nospace(l):
	ans = ''.join((str(i) for i in l))
	return ans
t = int(input())
for tt in range(t):
	(x, y, k) = map(int, sys.stdin.readline().split(' '))
	n = (y + 1) * k
	ans = k
	ans += (n - 1) // (x - 1)
	if (n - 1) % (x - 1) != 0:
		ans += 1
	print(ans)
if fileoperation:
	sys.stdout = orig_stdout
	sys.stdin = orig_stdin
	inputfile.close()
	outputfile.close()


def possible(moves, x, y, k):
	sticks = (x - 1) * moves + 1
	if sticks >= k * (y + 1):
		return True
	return False

def solve(x, y, k, ans):
	low = 0
	high = 10 ** 20
	while low <= high:
		mid = (low + high) // 2
		if possible(mid, x, y, k):
			moves = mid + k
			high = mid - 1
		else:
			low = mid + 1
	ans.append(str(moves))

def main():
	t = int(input())
	ans = []
	for i in range(t):
		(x, y, k) = map(int, input().split())
		solve(x, y, k, ans)
	print('\n'.join(ans))
main()


def staff_staff_trades(x, z):
	if (z - 1) % (x - 1) == 0:
		trades = (z - 1) // (x - 1)
	else:
		trades = (z - 1) // (x - 1) + 1
	return trades

def staff_carbon_trades(k):
	return k
t = int(input())
res_array = []
for i in range(t):
	(x, y, k) = map(int, input().split())
	z = k * (y + 1)
	all_trades = staff_staff_trades(x, z) + staff_carbon_trades(k)
	res_array.append(all_trades)
for i in range(t):
	print(res_array[i])


for _ in range(int(input())):
	import math
	(x, y, k) = map(int, input().split())
	ans = k
	s = y * k + k - 1
	ans += s // (x - 1)
	if s % (x - 1):
		ans += 1
	print(ans)


from math import ceil
for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	d = x - 1
	s = ceil((k * y - 1) / d)
	s1 = s * d - (k * y - 1)
	x1 = 0
	if s1 < k:
		x1 = ceil((k - s1) / d)
	print(s + k + x1)


t = int(input())
for c in range(t):
	(x, y, k) = map(int, input().split())
	print((k * (y + 1) - 1) // (x - 1) + k + (1 if (k * (y + 1) - 1) % (x - 1) else 0))


q = []
import math
t = int(input())
for j in range(t):
	l = list(input().split(' '))
	x = int(l[0])
	y = int(l[1])
	k = int(l[2])
	r = ((y + 1) * k - 1) // (x - 1)
	if ((y + 1) * k - 1) % (x - 1) != 0:
		r += 1
	q.append(r + k)
for i in q:
	print(i)


T = int(input())
ret = []
for t in range(T):
	(x, y, k) = map(int, input().split())
	ans = (k * y + k - 1) // (x - 1) + k
	if (k * y + k - 1) % (x - 1) != 0:
		ans += 1
	ret.append(ans)
for t in range(T):
	print(ret[t])


from math import floor
t = int(input())
A = []
for i in range(t):
	A.append(list(map(int, input().split())))
for m in range(t):
	x = A[m][0]
	y = A[m][1]
	k = A[m][2]
	print(((y + 1) * k - 1 + x - 2) // (x - 1) + k)


import math

def work():
	(x, y, k) = [int(i) for i in input().split()]
	n = (k * (y + 1) - 1) // (x - 1)
	if n * (x - 1) < k * (y + 1) - 1:
		n += 1
	print(n + k)

def main():
	t = int(input())
	while t > 0:
		work()
		t -= 1
main()


t = int(input())
for g in range(t):
	(x, y, k) = map(int, input().split())
	x -= 1
	z = (y + 1) * k
	if x == 1:
		print(z - 1 + k)
	elif z % x == 0 or z % x == 1:
		print(z // x + k)
	else:
		print(z // x + k + 1)


import sys, math
try:
	(sys.stdin, sys.stdout) = (open('input.txt', 'r'), open('out.txt', 'w'))
except:
	pass
from sys import stdin, stdout
mod = int(1000000000.0 + 7)
from statistics import mode
from collections import *
from math import ceil, floor, inf, factorial, gcd, log2, sqrt, log
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(n, r):
	(num, den) = (1, 1)
	r = min(n, n - r)
	for i in range(r):
		num *= n - i
		den *= i + 1
	return num // den

def ncr_p(n, r, p):
	(num, den) = (1, 1)
	r = min(r, n - r)
	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
	m = int(num ** 0.5) + 1
	for i in range(5, m, 6):
		if num % i == 0 or num % (i + 2) == 0:
			return False
	return True

def bin_search(s, low, high, val):
	while low <= high:
		mid = low + (high - low) // 2
		if s[mid] == val:
			return mid
		elif s[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 inputmatrix():
	(r, c) = iia()
	mat = [0] * r
	for i in range(r):
		mat[i] = iia()
	return (r, c, mat)

def prefix_sum(n, s):
	for i in range(1, n):
		s[i] += s[i - 1]
	return s

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

def y():
	print('Yes')

def n():
	print('No')
for _ in range(ii1()):
	(x, y, k) = iia()
	if (y * k + k - 1) % (x - 1) == 0:
		ans = (y * k + k - 1) // (x - 1)
	else:
		ans = (y * k + k - 1) // (x - 1) + 1
	print(ans + k)


from sys import stdin

class Input:

	def __init__(self):
		self.lines = stdin.read().splitlines()
		self.idx = 0

	def line(self):
		try:
			return self.lines[self.idx]
		finally:
			self.idx += 1

	def array(self, sep=' ', cast=int):
		return list(map(cast, self.line().split(sep=sep)))

	def known_tests(self):
		(num_of_cases,) = self.array()
		for case in range(num_of_cases):
			yield self

	def unknown_tests(self):
		while self.idx < len(self.lines):
			yield self

class Problem:

	def __init__(self, input):
		(x, y, k) = input.array()
		m = k * y + k
		n = k + (m - 1 + (x - 1 - 1)) // (x - 1)
		print(n)
for tc in Input().known_tests():
	Problem(tc)


t = int(input())
for tt in range(t):
	(x, y, k) = [int(i) for i in input().split()]
	tmp = (k * (1 + y) - 1) // (x - 1) + k
	if (k * (1 + y) - 1) % (x - 1) != 0:
		tmp += 1
	print(tmp)


for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	m = ((y + 1) * k - 1) // (x - 1)
	n = ((y + 1) * k - 1) % (x - 1)
	ans = k + m
	if n == 0:
		print(ans)
	else:
		print(ans + 1)


t = int(input())
x = []
y = []
k = []
for i in range(t):
	s = input().split()
	x.append(int(s[0]))
	y.append(int(s[1]))
	k.append(int(s[2]))
for i in range(t):
	d = x[i] - 1
	a = k[i] * (1 + y[i]) - 1
	b = a // d
	c = d * b + 1 - y[i] * k[i]
	count = b + k[i]
	while c < k[i]:
		b += 1
		c = d * b + 1 - y[i] * k[i]
		if c >= k[i]:
			count = b + k[i]
	print(count)


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, copy, functools
sys.setrecursionlimit(10 ** 7)
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):
		(x, y, k) = LI()
		t = y * k + k
		r = k + (t + x - 3) // (x - 1)
		rr.append(r)
	return JA(rr, '\n')
print(main())


def solve(x, y, k):
	sn = k * y + k
	mult = x - 1
	low = 0
	high = 1000000000999999999 + 1
	while low <= high:
		m = (low + high) // 2
		if mult * m + 1 >= sn:
			high = m - 1
		else:
			low = m + 1
	return low + k
t = int(input())
while t:
	(x, y, k) = map(int, input().split())
	print(solve(x, y, k))
	t -= 1


from decimal import Decimal
T = int(input())
for z in range(T):
	(x, y, k) = [int(x) for x in input().split()]
	ts = Decimal(y * k + k)
	tr = k
	d = x - 1
	n = 1 + (ts - x) / d
	if int(n) - n != 0:
		n = int(n) + 1
	n = int(n)
	tr = tr + n
	print(tr)


from sys import stdout
for _ in range(int(input())):
	(x, y, k) = [int(j) for j in input().split()]
	stdout.write(str(k - (1 - y * k - k) // (x - 1)))
	stdout.write('\n')


import math
for _ in range(int(input())):
	(x, y, k) = list(map(int, input().split()))
	snm = k + k * y - 1
	f = snm // (x - 1)
	if snm % (x - 1) != 0:
		f += 1
	print(f + k)


import math
for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	v = math.ceil((k + k * y - 1) / (x - 1))
	ans = 0
	if 1 + v * (x - 1) - k * y >= k:
		ans = v
	t = v
	while True:
		if 1 + t * (x - 1) - k * y < k:
			t += 1
		else:
			break
	b = t + k
	if 1 + t * (x - 1) - k * y >= k:
		ans = b
	t = v
	while t > 0:
		if 1 + (t - 1) * (x - 1) - k * y >= k:
			t -= 1
		else:
			break
	a = t + k
	if 1 + t * (x - 1) - k * y >= k:
		ans = a
	print(ans)


t = int(input())
for q in range(0, t):
	s = input()
	lst = list(map(int, s.split()))
	x = int(lst[0])
	y = int(lst[1])
	k = int(lst[2])
	ans = 0
	balance = 0
	if (k * y + k - 1) % (x - 1) != 0:
		balance = 1
	ans = int((k * y + k - 1) // (x - 1) + balance + k)
	print(int(ans))


import sys
import math
import collections
import bisect
import itertools
import decimal
import copy
import heapq
INF = 10 ** 20
MOD = 10 ** 9 + 7
ni = lambda : int(sys.stdin.readline().rstrip())
ns = lambda : list(map(int, sys.stdin.readline().rstrip().split()))
na = lambda : list(map(int, sys.stdin.readline().rstrip().split()))
na1 = lambda : list([int(x) - 1 for x in sys.stdin.readline().rstrip().split()])
flush = lambda : sys.stdout.flush()

def main():
	t = ni()
	for _ in range(t):
		(x, y, k) = ns()
		ans = k
		total = k + k * y - 1
		ans += -(-total // (x - 1))
		print(ans)

def __starting_point():
	main()
__starting_point()


t = int(input())
for _ in range(t):
	(x, y, k) = map(int, input().split())
	out = k
	want = k * y + k - 1
	div = x - 1
	out += (want + div - 1) // div
	print(out)


t = int(input())
for i in range(t):
	l = list(map(int, input().split()))
	x = l[0]
	y = l[1]
	k = l[2]
	print(((y + 1) * k - 1 + x - 2) // (x - 1) + k)


from sys import stdin

def input():
	return stdin.readline()

def mi():
	return map(int, input().split())
T = int(input())
for _ in range(T):
	(x, y, k) = mi()
	if (k * y + k - 1) % (x - 1) == 0:
		a = (k * y + k - 1) // (x - 1)
	else:
		a = (k * y + k - 1) // (x - 1) + 1
	print(k + a)


from sys import stdin, stdout

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

def gms():
	return map(str, stdin.readline().strip().split())

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

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

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

def gls():
	return list(stdin.readline())

def gi():
	return int(stdin.readline())
from math import ceil, floor
t = gi()
while t:
	t -= 1
	(x, y, k) = gmi()
	rs = k + y * k - 1
	ans = k
	if rs % (x - 1) == 0:
		ans += rs // (x - 1)
	else:
		ans += rs // (x - 1) + 1
	print(ans)


for _ in range(int(input())):
	(x, y, k) = list(map(int, input().split()))
	rem = k * y + k
	ans = (rem - 1) // (x - 1)
	if (rem - 1) % (x - 1):
		ans += 1
	ans += k
	print(ans)


from math import ceil
import sys
input = sys.stdin.readline

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

def prog():
	for _ in range(int(input())):
		(x, y, k) = map(int, input().split())
		tot = (k * (y + 1) - 1 + x - 2) // (x - 1) + k
		print(tot)
prog()


import math
for i in range(int(input())):
	s = [int(i) for i in input().split()]
	fin = s[1] * s[2] + s[2]
	total = (fin - 1) // (s[0] - 1)
	rem = (fin - 1) % (s[0] - 1)
	if rem:
		total += 1
	print(total + s[2])


t = int(input())
for _ in range(t):
	(s, c, k) = list(map(int, input().split()))
	p = k * c
	l = p + k - 1
	s = s - 1
	if l % s == 0:
		print(l // s + k)
	else:
		print(l // s + k + 1)


import sys

def main():
	tn = int(input())
	for ti in range(tn):
		(x, y, k) = map(int, input().split())
		tx = k * y + k
		a = (tx - 1) // (x - 1)
		if (tx - 1) % (x - 1) == 0:
			print(k + a)
		else:
			print(k + a + 1)
main()


from fractions import Fraction
from collections import defaultdict
import math
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))

def input():
	return sys.stdin.readline().rstrip('\r\n')
t = int(input())
for _ in range(t):
	(x, y, k) = [int(x) for x in input().split()]
	st = k * (y + 1) - 1
	if st % (x - 1) == 0:
		res = st // (x - 1) - 1
	else:
		res = st // (x - 1)
	print(res + k + 1)


import math
for i in range(int(input())):
	(x, y, k) = list(map(int, input().split()))
	l = x - 1
	need = k + k * y - 1
	if need % l:
		print(need // l + 1 + k)
	else:
		print(need // l + k)


T = int(input())
for _ in range(T):
	(x, y, k) = map(int, input().split())
	res = 0
	(l, r) = (0, 10000000000000000000)
	while l <= r:
		mid = (l + r) // 2
		if 1 - mid + mid * x >= k * (y + 1):
			res = mid
			r = mid - 1
		else:
			l = mid + 1
	print(res + k)


def get_transactions(target, x, y, k):
	stick = 1
	transactions = 0
	while stick != target:
		if stick * x <= target:
			transactions += stick
			stick *= x
		else:
			break
	while stick < target:
		rem = target - stick
		temp = rem // x
		stick += temp * x - temp
		transactions += temp
		if rem < x:
			transactions += 1
			break
	transactions += k
	return transactions
for _ in range(int(input())):
	(x, y, k) = list(map(int, input().split()))
	target = k + y * k
	print(get_transactions(target, x, y, k))


import math
for i in range(int(input())):
	(x, y, z) = map(int, input().split(' '))
	i1 = y * z + z - 1
	if i1 % (x - 1) == 0:
		i2 = i1 // (x - 1)
	else:
		i2 = i1 // (x - 1) + 1
	i3 = i2 + z
	print(i3)


for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	tmp = (k * y + k - 1) // (x - 1)
	if tmp * (x - 1) < k * y + k - 1:
		tmp += 1
	tmp += k
	print(tmp)


t = int(input())
w = []
for i in range(t):
	(x, y, k) = input().split()
	x = int(x)
	y = int(y)
	k = int(k)
	if (k + k * y - 1) % (x - 1) == 0:
		w.append(k + (-1 + k + k * y) // (x - 1))
	else:
		w.append(k + 1 + (-1 + k + k * y) // (x - 1))
for i in w:
	print(i)


import math
from sys import stdout

def main():
	(x, y, k) = map(int, input().split())
	need = k * (y + 1) - 1
	if need % (x - 1) != 0:
		print(need // (x - 1) + 1 + k)
		return
	print(need // (x - 1) + k)
t = int(input())
for i in range(t):
	main()


from sys import stdin, stdout
from math import ceil, floor, gcd, fabs, factorial, fmod, sqrt, inf
mod = pow(10, 9) + 7
mod2 = 998244353

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

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(n, val) for j in range(m)]
for _ in range(int(inp())):
	(a, b, c) = mp()
	x = c * (b + 1) - 1
	y = a - 1
	k = 1 if x % y else 0
	out((c * (b + 1) - 1) // (a - 1) + c + k)


for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	req = k * y + k - 1
	req //= x - 1
	if (k * y + k - 1) % (x - 1) != 0:
		req += 1
	print(req + k)


def result():
	a = int(input())
	for i in range(a):
		res = 0
		x = input().split()
		a = int(x[0])
		b = int(x[1])
		c = int(x[2])
		res += -(-(c + b * c - 1) // (a - 1))
		print(res + c)
result()


for i in range(int(input())):
	(x, y, k) = map(int, input().split())
	out = (k * (y + 1) - 1) // (x - 1) + k
	if (k * (y + 1) - 1) % (x - 1):
		out += 1
	print(out)


t = int(input(''))
arr = []
for i in range(t):
	arr.append(list(map(int, input().split())))
for i in arr:
	x = i[0]
	y = i[1]
	k = i[2]
	tot = k * y + k
	turn = (tot - 2) // (x - 1) + 1 + k
	print(turn)


for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	(s, c, n) = (1, 0, k + k * y)
	while s < n:
		if x * s <= n:
			c += s
			s = s * x
		else:
			r = (n - s) // (x - 1)
			c += r
			if (n - s) % (x - 1) > 0:
				c += 1
			s = n
	print(c + k)


import itertools
import math
import sys
input = sys.stdin.readline

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

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

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

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

def pba(x, y, k):
	need = k * (y + 1)
	(q, r) = divmod(need - x, x - 1)
	temp = q + 1 if r > 0 else q
	return temp + k + 1
for _ in range(inp()):
	(x, y, k) = invar()
	print(pba(x, y, k))


for _ in range(int(input())):
	(s, c, k) = map(int, input().split())
	if s == 2:
		ans = 0
		ans = ans + k + (c * k + k - 1)
		print(ans)
	else:
		ans = 0
		totalsticks = c * k + k
		rem = totalsticks % (s - 1)
		trades = totalsticks // (s - 1)
		if rem <= 1:
			ans = ans + trades
		else:
			ans = ans + trades + 1
		ans = ans + k
		print(ans)


from decimal import *
for i in range(int(input())):
	(X, Y, K) = map(int, input().split())
	a = Decimal(K * Y + K - 1)
	b = Decimal(X - 1)
	n = a / b + (a % b != 0)
	print(int(n) + K)


for t in range(int(input())):
	(x, y, k) = tuple(map(int, input().split()))
	num = k * (1 + y) - 1
	den = x - 1
	if num % den == 0:
		a = num // den
	else:
		a = num // den + 1
	b = k
	print(a + b)


n = int(input())
a = []
for i in range(n):
	[x, y, z] = [int(a) for a in input().split()]
	ans = (z * y + z - 1) // (x - 1)
	if (z * y + z - 1) % (x - 1):
		ans = ans + 1
	a.append(ans + z)
for i in range(n):
	print(a[i])


def getCount(x, y, k):
	tscn = k
	sticks = k * y + k - 1
	tscn += sticks // (x - 1)
	if sticks % (x - 1) != 0:
		tscn += 1
	return tscn
t = int(input())
for i in range(t):
	(x, y, k) = tuple(map(int, input().split()))
	print(getCount(x, y, k))


import sys
import math, bisect
sys.setrecursionlimit(10 ** 5)
from collections import defaultdict
from itertools import groupby, accumulate
from heapq import heapify, heappop, heappush
from collections import deque, Counter, OrderedDict

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

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

def Neo():
	return list(map(int, sys.stdin.readline().split()))
for _ in range(I()):
	Ans = 0
	(x, y, k) = neo()
	p = k * y
	Ans += k
	p = k * y + k
	i = 1
	while i * x < p:
		Ans += i
		i = i * x
	t = i - p
	print(Ans - t // (x - 1))


for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	required = y * k + k
	if (required - 1) % (x - 1) == 0:
		print((required - 1) // (x - 1) + k)
	else:
		print((required - 1) // (x - 1) + 1 + k)


import sys
input = sys.stdin.buffer.readline
for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	need = y * k + k
	print((need - 1 + x - 2) // (x - 1) + k)


from collections import Counter, deque, defaultdict
from itertools import accumulate, product, groupby
import operator
import math
from functools import reduce
import sys
input = sys.stdin.readline
import decimal

def readIntLine():
	return [int(char) for char in input().split()]

def readCharLine():
	return [char for char in input().split()]

def solve():
	(x, y, k) = readIntLine()
	x = decimal.Decimal(x)
	y = decimal.Decimal(y)
	k = decimal.Decimal(k)
	num = k * y + k - 1
	dem = x - 1
	return math.ceil(num / dem) + k
for _ in range(int(input())):
	print(solve())


for t in range(int(input())):
	(x, y, z) = map(int, input().split())
	total = z + z * y
	if (total - x) % (x - 1) == 0:
		req = (total - x) // (x - 1) + 1
	else:
		req = (total - x) // (x - 1) + 2
	print(req + z)


for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	tot = y * k + k
	n = (tot - 1) // (x - 1)
	if (tot - 1) % (x - 1) != 0:
		n += 1
	print(n + k)


from sys import stdin
T = int(stdin.readline().strip())
for caso in range(T):
	(x, y, k) = map(int, stdin.readline().strip().split())
	st = k + k * y - 1
	q = st // (x - 1)
	if st % (x - 1) != 0:
		q += 1
	print(q + k)


from math import ceil

def ceil_div(a, b):
	return (a + b - 1) // b
for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	total = k + k * y
	c = ceil_div(total - 1, x - 1)
	c += k
	print(c)


t = int(input())
s = ''
for T in range(t):
	(x, y, k) = input().split()
	x = int(x)
	y = int(y)
	k = int(k)
	n = (k * (x + y) - 1) // (x - 1)
	r = (k * (x + y) - 1) % (x - 1)
	d = 0
	if r != 0:
		d = 1
	n += d
	s += str(n) + '\n'
print(s)


import sys
MOD = 10 ** 9 + 7
INF = 10 ** 9
PI = 3.141592653589793

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

def read_int():
	return int(sys.stdin.readline().strip())

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

def read_ints2(x):
	return map(lambda num: int(num) - x, sys.stdin.readline().strip().split())

def read_str_list():
	return list(sys.stdin.readline().strip().split())

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

def GCD(a: int, b: int) -> int:
	return b if a % b == 0 else GCD(b, a % b)

def LCM(a: int, b: int) -> int:
	return a * b // GCD(a, b)

def Main():
	for _ in range(read_int()):
		(x, y, k) = read_ints()
		stick = k * y + k
		cnt = (stick - 1) // (x - 1)
		if (stick - 1) % (x - 1):
			cnt += 1
		cnt += k
		print(cnt)
Main()


def solve():
	t = int(input())
	for _ in range(t):
		(x, y, k) = list(map(int, input().split()))
		s = ((y + 1) * k - 3 + x) // (x - 1)
		print(k + s)
solve()


def f(x, y, k):
	A = ((y + 1) * k - 1) // (x - 1)
	if A * (x - 1) + 1 - k * (y + 1) >= 0:
		return A + k
	else:
		return A + k + 1
for _ in range(int(input().strip())):
	(x, y, k) = map(int, input().strip().split())
	print(f(x, y, k))


from sys import stdin
for _ in range(int(stdin.readline())):
	(x, y, k) = list(map(int, stdin.readline().split()))
	res = k
	(a, b) = divmod(k * (y + 1) - 1, x - 1)
	res += a
	if b > 0:
		res += 1
	print(res)


import sys, os.path
from collections import *
from copy import *
import math
mod = 10 ** 9 + 7
if os.path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
for t in range(int(input())):
	(x, y, k) = map(int, input().split())
	num = k * y + k - 1
	den = x - 1
	print((num + den - 1) // den + k)


for q in range(int(input())):
	(x, y, k) = [int(i) for i in input().split()]
	req_st = k + y * k
	count = (req_st - 1) // (x - 1)
	if (req_st - 1) % (x - 1) != 0:
		count = int(count) + 1
	else:
		count = int(count)
	print(count + k)


from math import *

def ceil_div(a, b):
	return (a + b - 1) // b
t = int(input())
for i in range(t):
	(x, y, k) = input().split()
	(x, y, k) = (int(x), int(y), int(k))
	steps = ceil_div(y * k + k - 1, x - 1)
	print(steps + k)


import math

def iinput():
	return [int(i) for i in input().split()]
t = int(input())
for _ in range(t):
	(x, y, k) = iinput()
	summ_pal = y * k + k
	ans = (summ_pal + x - 3) // (x - 1) + k
	print(ans)


t = int(input())
while t > 0:
	t -= 1
	(x, y, k) = map(int, input().split(' '))
	sticks = y * k + k
	d = x - 1
	steps = 1
	r = sticks - x
	steps += r // d
	if r % d != 0:
		steps += 1
	steps += k
	print(steps)


import math

def trade(x, y, k):
	count = 0
	stick = 1
	torch = 0
	stick_need = y * k + k - 1
	if stick_need % (x - 1) > 0:
		trade1 = stick_need // (x - 1) + 1
	else:
		trade1 = stick_need // (x - 1)
	trade2 = k
	return int(trade1 + trade2)
t = int(input())
for i in range(t):
	(x, y, k) = map(int, input().split())
	print(trade(x, y, k))


for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	total_sticks = y * k + k - 1
	(q, rem) = divmod(total_sticks, x - 1)
	if rem:
		q += 1
	print(q + k)


import math
t = int(input())
for _ in range(t):
	(x, y, k) = map(int, input().split())
	sticks_req = y * k + k - 1
	stick_op = (sticks_req + x - 2) // (x - 1)
	print(stick_op + k)


q = int(input())
for t in range(q):
	(x, y, k) = map(int, input().split())
	a = ((y + 1) * k - 1 + x - 1 - 1) // (x - 1)
	b = k
	print(a + b)


from sys import stdin
import math
from decimal import *
t = int(stdin.readline())
getcontext().prec = 25

def solve(x, y, k):
	n1 = math.ceil((Decimal(k * y) + Decimal(k - 1)) / Decimal(x - 1))
	print(n1 + k)
for _ in range(t):
	(x, y, k) = list(map(int, stdin.readline().rstrip().split()))
	solve(x, y, k)


t = int(input())
for _ in range(t):
	(x, y, k) = [int(x) for x in input().split()]
	required_sticks = k * y + k - 1
	stick_trades = required_sticks // (x - 1) + (required_sticks % (x - 1) > 0)
	print(stick_trades + k)


from sys import stdout, stdin
(_input, _print) = (stdin.readline, stdout.write)
(_int, _range) = (int, range)

def solution():
	for _ in _range(_int(_input())):
		(x, y, k) = [_int(i) for i in _input().split()]
		z = k * y
		p = (k - 1 + z) // (x - 1) + (1 if (k - 1 + z) % (x - 1) != 0 else 0)
		print(p + k)
solution()


t = int(input())
for _ in range(t):
	(x, y, k) = map(int, input().split())
	sticks = 1
	number1 = k
	number2 = k * y
	number = number1 + number2 - 1
	print(number // (x - 1) + int(number % (x - 1) != 0) + k)


import sys
input = sys.stdin.readline
for test in range(int(input())):
	(x, y, k) = [int(i) for i in input().split()]
	need = y * k + k - 1
	print((need + (x - 2)) // (x - 1) + k)


t = int(input())
for _ in range(t):
	(x, y, k) = [int(s) for s in input().split(' ')]
	sticks = k * (y + 1)
	if (sticks - 1) % (x - 1) == 0:
		print((sticks - 1) // (x - 1) + k)
	else:
		print((sticks - 1) // (x - 1) + k + 1)


from math import ceil
t = int(input())
while t:
	t -= 1
	(x, y, k) = map(int, input().split())
	ans = (y * k + k - 1) // (x - 1)
	if ans * (x - 1) < y * k + k - 1:
		ans += 1
	print(ans + k)


for it in range(int(input())):
	(x, y, k) = [int(i) for i in input().split()]
	ans = (k * y + k - 1 + x - 2) // (x - 1)
	print(ans + k)


from math import ceil
for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	t1 = k * (y + 1) - 1
	t2 = x - 1
	if t1 % t2 == 0:
		temp = t1 // t2
	else:
		temp = t1 // t2
		temp += 1
	print(k + temp)


for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	req = k * (y + 1)
	a = x - 1
	b = (req - 1) // a
	if a * b != req - 1:
		b = b + 1
	print(b + k)


def ceildiv(a, b):
	return -(-a // b)
cases = int(input())
for _ in range(cases):
	(x, y, k) = input().split()
	x = int(x)
	y = int(y)
	k = int(k)
	needed_sticks = k + y * k
	exchanges = k
	exchanges += ceildiv(needed_sticks - 1, x - 1)
	print(exchanges)


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	print((k * (y + 1) - 1) // (x - 1) + ((k * (y + 1) - 1) % (x - 1) > 0) + k)


from sys import stdin, stdout
import math
t = int(stdin.readline())
for _ in range(t):
	(x, y, k) = map(int, stdin.readline().split())
	movs = (k * y + k - 1) // (x - 1)
	if movs * (x - 1) < k * y + k - 1:
		movs += 1
	movs += k
	print(movs)


import math
for _ in range(int(input())):
	(x, y, k) = list(map(int, input().split()))
	total_sticks_required = k + k * y - 1
	net_incr_in_trade = x - 1
	trades = total_sticks_required // net_incr_in_trade
	remiander = min(1, total_sticks_required % net_incr_in_trade)
	trades += k + remiander
	print(trades)


from sys import stdin, stdout
for _ in range(int(stdin.readline())):
	(x, y, k) = list(map(int, stdin.readline().split()))
	turns = (k * y + k - 1) // (x - 1)
	if 1 + turns * (x - 1) < k * y + k:
		turns += 1
	print(turns + k)


import sys
from collections import defaultdict
input = sys.stdin.readline
from collections import deque

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())
nb = inp()
for i in range(nb):
	(x, y, k) = invr()
	res = k + int((k * (y + 1) - 1) // (x - 1))
	if (k * (y + 1) - 1) % (x - 1) != 0:
		res += 1
	print(res)


def sol_args(x, y, t):
	x -= 1
	total_sticks = t - 1 + y * t
	(trades, rest) = divmod(total_sticks, x)
	if rest > 0:
		trades += 1
	trades += t
	return trades

def main():
	T = int(input())
	for t in range(T):
		(x, y, t) = map(int, input().split())
		print(sol_args(x, y, t))
main()


import math
for i in range(int(input())):
	(x, y, k) = map(int, input().split())
	s_req = y * k + k - 1
	counter = (y * k + k - 1 + x - 1 - 1) // (x - 1)
	counter += k
	print(int(counter))


from math import ceil
from fractions import Fraction
t = int(input())
for i in range(t):
	(x, y, k) = map(int, input().split())
	palki = k * (y + 1)
	print(ceil(Fraction(palki - 1, x - 1)) + k)


import sys
input = sys.stdin.buffer.readline
Q = int(input())
for _ in range(Q):
	(a, b, c) = map(int, input().split())
	ans = c + (c * b + c - 1 + a - 2) // (a - 1)
	print(ans)


from math import ceil
t = int(input())
res = 0
for i in range(t):
	(x, y, k) = map(int, input().split())
	res = ceil((k + k * y + x - 3) // (x - 1) + k)
	print(res)


from math import *
from sys import *
t = int(input())
for _ in range(t):
	(x, y, k) = map(int, input().split())
	n = (y + 1) * k
	ans = k
	p = (n - 1) % (x - 1)
	if p == 0:
		ans = ans + (n - 1) // (x - 1)
	else:
		ans = ans + (n - 1) // (x - 1)
		ans = ans + 1
	print(ans)


from math import *
t = int(input())
while t > 0:
	(x, y, k) = [int(i) for i in input().split()]
	ans = ceil((k * y - x) / (x - 1)) + 1
	sticks = ans * x - (ans - 1)
	rest = sticks - k * y
	ans += k
	if rest >= k:
		print(ans)
	else:
		ans += ceil((k - rest) / (x - 1))
		print(ans)
	t -= 1


for _ in range(int(input())):
	(s, c, t) = map(int, input().split())
	res = 0
	res += t
	sticks = c * t + t
	sticks -= 1
	res += (sticks + (s - 1) - 1) // (s - 1)
	print(res)


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))
from types import GeneratorType

def iterative(f, stack=[]):

	def wrapped_func(*args, **kwargs):
		if stack:
			return f(*args, **kwargs)
		to = f(*args, **kwargs)
		while True:
			if type(to) is GeneratorType:
				stack.append(to)
				to = next(to)
				continue
			stack.pop()
			if not stack:
				break
			to = stack[-1].send(to)
		return to
	return wrapped_func
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 pp in range(t):
		solve(pp)

def printlist(a):
	for p in range(0, len(a)):
		out(str(a[p]) + ' ')

def google(p):
	print('Case #' + str(p) + ': ', end='')

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

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 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(case):
	(x, y, k) = sep()
	stick = x
	req = y * k - x
	ff = ceil(req / (x - 1))
	stick += (x - 1) * ff
	stick -= y * k
	if stick >= k:
		print(ff + 1 + k)
	else:
		rem = k - stick
		print(ff + ceil(rem / (x - 1)) + k + 1)
testcase(int(inp()))


def calc():
	(x, y, k) = map(int, input().split())
	coal = k
	sticknum = k * y + k - 1
	tot = sticknum // (x - 1)
	if sticknum % (x - 1):
		tot += 1
	tot += k
	return tot
testcase = int(input())
ans = []
for i in range(testcase):
	ans.append(calc())
print(*ans, sep='\n')


t = int(input())
from math import ceil
ans = []

def divceil(a, b):
	return (a + b - 1) // b
for _ in range(t):
	(newsticks, coals, target) = map(int, input().split())
	minamount = target + target * coals - 1
	counter = divceil(minamount, newsticks - 1)
	ans.append(str(counter + target))
print('\n'.join(ans))


for s in range(int(input())):
	(x, y, k2) = list(map(int, input().split()))
	s = 1
	c = 0
	np = k2 * y
	d = (np - 1 + k2) // (x - 1)
	if (np - 1 + k2) % (x - 1) != 0:
		d += 1
	print(d + k2)


import math

def get_result():
	(x, y, k) = list(map(int, input().split()))
	t = (y + 1) * k - 1 + x - 2
	trades = t // (x - 1) + k
	return int(trades)

def main():
	t = int(input())
	for i in range(t):
		print(get_result())
main()


from sys import stdin, stdout
from math import ceil

class SOLVE:

	def solve(self):
		R = stdin.readline
		W = stdout.write
		ans = []
		for i in range(int(R())):
			(x, y, k) = [int(x) for x in R().split()]
			stick = k + k * y
			move = k + (stick - 1) // (x - 1) + bool((stick - 1) % (x - 1))
			ans.append(str(move))
		W('\n'.join(ans))

def main():
	s = SOLVE()
	s.solve()
main()


testcase = int(input())
for test in range(testcase):
	(x, y, k) = map(int, input().split())
	res = (k * (y + 1) - x) // (x - 1)
	if (k * (y + 1) - x) % (x - 1) != 0:
		res += 1
	res = res + k + 1
	print(res)


import math
tests = int(input())
for testnum in range(tests):
	numbers = map(int, input().split())
	numbers = list(numbers)
	x = numbers[0]
	y = numbers[1]
	k = numbers[2]
	trades = k + k * y - 1
	indicator = 0
	if trades % (x - 1) != 0:
		indicator = 1
	trades = trades // (x - 1)
	trades = trades + indicator
	trades += k
	print(int(trades))


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

def solution(x, y, k):
	res = 0
	total = y * k + k
	sticks = 1
	while sticks * x < total:
		res += sticks
		sticks *= x
	factor = (total - sticks) // (x - 1)
	if sticks + factor * x - factor < total:
		factor += 1
	res += factor
	res += k
	write(res)

def main():
	for _ in range(r_int()):
		(x, y, k) = r_array()
		solution(x, y, k)
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 input():
	return sys.stdin.readline().rstrip('\r\n')

def write(*args, end='\n'):
	for x in args[:-1]:
		sys.stdout.write(str(x) + ' ')
	sys.stdout.write(str(args[-1]))
	sys.stdout.write(end)

def r_array():
	return [int(x) for x in input().split()]

def r_int():
	return int(input())
main()


t = int(input(''))
while t > 0:
	(a, b, k) = map(int, input().split())
	ans = (k * (b + 1) - 1) // (a - 1)
	if (k * (b + 1) - 1) % (a - 1) != 0:
		ans += 1
	print(ans + k)
	t -= 1


import math
n = input()
for i in range(int(n)):
	string = input()
	arr = string.split(' ')
	x = int(arr[0])
	y = int(arr[1])
	k = int(arr[2])
	n = int(k - 1 + k * y)
	n = -(-n // (x - 1))
	print(int(n + k))


n = int(input())
i = 0
while i < n:
	(x, y, k) = [int(i) for i in input().split()]
	ugol = (k * y - 1) // (x - 1)
	while x * ugol - (ugol - 1) < k * y:
		ugol += 1
	a = x * ugol - (ugol - 1) - k * y
	if a == 0:
		ugol += 1
		a = x * ugol - (ugol - 1) - k * y
	a -= 1
	u = (k - a - 1) // (x - 1)
	if u * x - (u - 1) + a < k:
		u += 1
	print(u + ugol + k)
	i += 1


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()

def listStr():
	return list(input())
import math

def solve():
	(X, Y, K) = getInts()
	if K == 0:
		return 0
	ans = (K + K * Y - 1) // (X - 1)
	ans += K
	if (K + K * Y - 1) % (X - 1) > 0:
		ans += 1
	return ans
T = getInt()
for t in range(T):
	ans = solve()
	print(ans)


from sys import stdin
import math
input = stdin.readline
T = int(input())
for t in range(1, T + 1):
	(x, y, k) = map(int, input().split())
	min_stick_needed = y * k + k
	print(k + (min_stick_needed - 1 + (x - 2)) // (x - 1))


t = int(input())
for _ in range(t):
	(s, c, t) = map(int, input().split())
	torch = t + c * t
	if (torch - 1) % (s - 1) != 0:
		print((torch - 1) // (s - 1) + 1 + t)
	else:
		print((torch - 1) // (s - 1) + t)


import sys

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

def read():
	return [int(x) for x in inpt().split()]
from math import ceil, floor

def cdiv(a, b):
	ret = a // b + int(a % b != 0)
	return ret
(t,) = read()
for _ in range(t):
	(x, y, k) = read()
	tot = k * (1 + y)
	print(cdiv(tot - 1, x - 1) + k)


import sys

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

def MI():
	return map(int, sys.stdin.readline().rstrip().split())
t = I()
for i in range(t):
	(x, y, k) = MI()
	print(k + (k * (y + 1) + x - 3) // (x - 1))


import sys
reader = (s.rstrip() for s in sys.stdin)
input = reader.__next__

def gift():
	for _ in range(t):
		(x, y, k) = list(map(int, input().split()))
		requirex = k * (y + 1) - 1
		ans = requirex // (x - 1) + k
		if requirex % (x - 1):
			ans += 1
		yield ans
t = int(input())
ans = gift()
print(*ans, sep='\n')


from math import ceil, floor
from decimal import *
t = int(input())
for _ in range(t):
	(x, y, k) = map(int, input().strip().split())
	ans = Decimal(y * k + k - 1) / Decimal(x - 1)
	ans = ceil(ans)
	ans += k
	print(ans)


for nt in range(int(input())):
	(x, y, k) = map(int, input().split())
	one = (y * k - 1) // (x - 1) + 1
	count = one + k
	left = (k - (one * (x - 1) - y * k + 1) - 1) // (x - 1) + 1
	print(count + left)


import math

def get_int():
	return int(input())

def get_ints():
	return [int(x) for x in input().split()]
t = get_int()
for test in range(0, t):
	(x, y, k) = get_ints()
	n = math.ceil((k * y + k - 1) / (x - 1))
	while k * y + k > (x - 1) * n + 1:
		n += 1
	while k * y + k <= (x - 1) * n + 1:
		n -= 1
	n += 1
	print(int(n) + k)


import math
for i in range(int(input())):
	(x, y, k) = map(int, input().split())
	c = y * k + k
	if True:
		if k != 0:
			i = (y * k + k) // (x - 1)
			if (i - 2) * (x - 1) + x >= y * k + k:
				print(i - 1 + k)
			elif (i - 1) * (x - 1) + x >= y * k + k:
				print(i + k)
			else:
				print(i + k + 1)


def check(s, c, t):
	sums = c * t + (t - 1)
	count = sums // (s - 1)
	r = sums % (s - 1)
	if r != 0:
		count += 1
	count = count + t
	count = int(count)
	print(count)
for _ in range(int(input())):
	(s, c, t) = map(int, input().split())
	check(s, c, t)


def f(a, s):
	return -(-a // s)
for i in range(int(input())):
	(x, y, k) = map(int, input().split())
	print(f(y * k + k - 1, x - 1) + k)


for _ in range(int(input())):
	(x, y, k) = [int(x) for x in input().split()]
	a = (y + 1) * k
	cnt = k + 1
	a -= x
	if a % (x - 1):
		cnt += a // (x - 1) + 1
	else:
		cnt += a // (x - 1)
	print(cnt)


import sys
import math
from collections import Counter
from collections import OrderedDict

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

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

def listt():
	return [int(i) for i in inputt().split()]

def gcd(a, b):
	return math.gcd(a, b)

def lcm(a, b):
	return a * b / gcd(a, b)
t = int(inputt())
for _ in range(t):
	(x, y, k) = map(int, inputt().split())
	coal = k * y
	sticks = coal + k
	if (sticks - 1) % (x - 1) == 0:
		ans = (sticks - 1) // (x - 1)
	else:
		ans = (sticks - 1) // (x - 1) + 1
	ans += k
	printt(ans)


TC = int(input())
for tc in range(TC):
	(X, Y, K) = map(int, input().split())
	print(-(-(K * Y + K - 1) // (X - 1)) + K)


for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	if not (k + y * k - 1) % (x - 1):
		print(int((k + y * k - 1) // (x - 1) + k))
	else:
		print(int((k + y * k - 1) // (x - 1) + k + 1))


from bisect import bisect_left
import os
import sys
from io import BytesIO, IOBase
from collections import Counter, defaultdict
from collections import deque
from functools import cmp_to_key
import math
import heapq

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()):
		(x, y, k) = ain()
		c = k
		s = k
		cs = k * y
		n = math.ceil((cs - x) / (x - 1))
		ts = x + n * (x - 1)
		n += k
		rem = ts - cs
		if rem >= s:
			print(n + 1)
		else:
			nn = math.ceil((s - rem) / (x - 1))
			print(n + nn + 1)
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 os.getcwd() == 'D:\\code':
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
	input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


import itertools
import math
import sys
from collections import defaultdict

def stdinWrapper():
	data = '5\n2 1 5\n42 13 24\n12 11 12\n1000000000 1000000000 1000000000\n2 1000000000 1000000000\n'
	for line in data.split('\n'):
		yield line
if '--debug' not in sys.argv:

	def stdinWrapper():
		while True:
			yield input()
inputs = stdinWrapper()

def inputWrapper():
	return next(inputs)

def getType(_type):
	return _type(inputWrapper())

def getArray(_type):
	return [_type(x) for x in inputWrapper().split()]

def solve(x, y, k):
	rest = 1 if (k + k * y - 1) % (x - 1) > 0 else 0
	return k + (k + k * y - 1) // (x - 1) + rest
t = getType(int)
for _ in range(t):
	(x, y, k) = getArray(int)
	print(solve(x, y, k))


t = int(input())
for _ in range(t):
	(x, y, k) = map(int, input().split())
	a = k * (1 + y) - 1
	if a % (x - 1) == 0:
		print(a // (x - 1) + k)
	else:
		print(a // (x - 1) + 1 + k)


import math
t = int(input())
for a in range(t):
	b = [int(i) for i in input().split()]
	(x, y, k) = (b[0], b[1], b[2])
	if (k * y + k - 1) % (x - 1) == 0:
		print((k * y + k - 1) // (x - 1) + k)
	else:
		print((k * y + k - 1) // (x - 1) + 1 + k)


t = int(input())
for i in range(t):
	(x, y, k) = [int(el) for el in input().split()]
	ans = k * y + k - 1
	ans = -(ans // -(x - 1))
	print(ans + k)


for i in range(int(input())):
	(x, y, k) = map(int, input().split())
	p = k * y + k - 1
	q = x - 1
	r = p // q
	if p % q != 0:
		r = r + 1
	print(r + k)


import math
t = int(input())
while t:
	t -= 1
	(x, y, k) = map(int, input().split())
	num = k * y + k
	num -= 1
	num //= x - 1
	if num * (x - 1) + 1 < k * y + k:
		num += 1
	print(num + k)


for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	q = k
	p = -1
	if (k * y + k - 1) % (x - 1) == 0:
		p = (k * y + k - 1) // (x - 1)
	else:
		p = 1 + (k * y + k - 1) // (x - 1)
	print(p + q)


import sys, math
input = lambda : sys.stdin.readline().rstrip()
for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	c = k + y * k - 1
	ans = c // (x - 1)
	if c % (x - 1) != 0:
		ans += 1
	print(ans + k)


for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	no_of_sticks = k + k * y
	ans = 0
	temp = 1
	no_of_sticks -= 1
	x = x - 1
	if no_of_sticks % x:
		ans += no_of_sticks // x + 1
	else:
		ans += no_of_sticks // x
	ans += k
	print(ans)


for _ in range(int(input())):
	a = list(map(int, input().split()))
	x = a[0]
	y = a[1]
	k = a[2]
	print((k + y * k - 1 + x - 2) // (x - 1) + k)


from sys import stdin, stdout
from math import *

def main():
	t = int(stdin.readline())
	for _ in range(t):
		(x, y, k) = [int(i) for i in stdin.readline().split()]
		required = k * (y + 1)
		trades = k
		op = (required - 1) // (x - 1)
		if (required - 1) % (x - 1) != 0:
			op += 1
		trades += op
		print(trades)
main()


def p(trades, x, y, k):
	sticks = trades * (x - 1) + 1
	coals = sticks // y
	resto_sticks = 0
	if coals >= k:
		resto_sticks = (coals - k) * y
		resto_sticks += sticks % y
	return coals >= k and resto_sticks >= k

def bs(x, y, k):
	low = 1
	high = 10 ** 19
	while low < high:
		mid = (high + low) // 2
		if p(mid, x, y, k):
			high = mid
		else:
			low = mid + 1
	return high
t = int(input())
for i in range(t):
	(x, y, k) = map(int, input().split(' '))
	print(bs(x, y, k) + k)


for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	trades = k + 1
	total_stick = (y + 1) * k - x
	if total_stick > 0:
		trades += total_stick // (x - 1)
		if total_stick % (x - 1):
			trades += 1
	print(trades)


t = int(input())
while t > 0:
	a = list(map(int, input().split()))
	if (a[2] * a[1] + a[2] - 1) % (a[0] - 1) == 0:
		print((a[2] * a[1] + a[2] - 1) // (a[0] - 1) + a[2])
	else:
		print((a[2] * a[1] + a[2] - 1) // (a[0] - 1) + a[2] + 1)
	t -= 1


for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	ans = k + 1
	req = y * k + k
	bb = x
	aa = req - bb
	bb = aa // (x - 1)
	if aa % (x - 1) != 0:
		bb += 1
	print(ans + bb)


import math
import os
import random
import re
import sys
from decimal import *

def minval(arr):
	x = arr[0]
	y = arr[1]
	k = arr[2]
	getcontext().prec = 30
	j = Decimal(k + k * y - 1) / Decimal(x - 1)
	a = math.ceil(j)
	b = k
	return a + b
t = int(input())
inp = []
for i in range(t):
	inp.append(list(map(int, input().rstrip().split())))
for i in range(t):
	print(minval(inp[i]))


from __future__ import division, print_function
import os, sys
from io import BytesIO, IOBase
import threading, sys
from threading import Thread, main_thread

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

def si():
	return input()

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

def msi():
	return map(str, input().strip().split(' '))

def li():
	return list(mi())

def dmain():
	sys.setrecursionlimit(100000000)
	threading.stack_size(10240000)
	thread = threading.Thread(target=main)
	thread.start()
abc = 'abcdefghijklmnopqrstuvwxyz'
abd = {'a': 0, 'b': 1, 'c': 2, 'd': 3, 'e': 4, 'f': 5, 'g': 6, 'h': 7, 'i': 8, 'j': 9, 'k': 10, 'l': 11, 'm': 12, 'n': 13, 'o': 14, 'p': 15, 'q': 16, 'r': 17, 's': 18, 't': 19, 'u': 20, 'v': 21, 'w': 22, 'x': 23, 'y': 24, 'z': 25}
mod = 1000000007
inf = float('inf')
vow = ['a', 'e', 'i', 'o', 'u']
(dx, dy) = ([-1, 1, 0, 0], [0, 0, 1, -1])

def getKey(item):
	return item[0]

def sort2(l):
	return sorted(l, key=getKey)

def d2(n, m, num):
	return [[num for x in range(m)] for y in range(n)]

def isPowerOfTwo(x):
	return x and (not x & x - 1)

def decimalToBinary(n):
	return bin(n).replace('0b', '')

def ntl(n):
	return [int(i) for i in str(n)]

def ncr(n, r):
	return factorial(n) // (factorial(r) * factorial(n - r))

def ceil(x, y):
	if x % y == 0:
		return x // y
	else:
		return x // y + 1

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

def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

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 main():
	for _ in range(ii()):
		(x, y, k) = mi()
		ans = 0
		p = k * y + k - 1
		st = 1
		low = 0
		high = 10 ** 19
		while low <= high:
			mid = (low + high) // 2
			cur = -mid + x * mid
			if cur >= p:
				ans = mid + k
				high = mid - 1
			else:
				low = mid + 1
		print(ans)
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()
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


import math

def ceil_div(a, b):
	return (a + b - 1) // b
t = int(input())
for _ in range(t):
	(x, y, k) = map(int, input().split())
	num = k * (1 + y) - 1
	den = x - 1
	ans = ceil_div(num, den)
	ans += k
	print(ans)


def ceil(x, y):
	if x % y == 0:
		return x // y
	else:
		return x // y + 1
for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	val = z * y + z - 1
	result = z
	sum = 1
	result = ceil(val, x - 1)
	print(result + z)


import sys
t = int(input())
for i in range(t):
	(x, y, k) = map(int, sys.stdin.readline().rstrip().split())
	sys.stdout.write(str((k + k * y + x - 3) // (x - 1) + k) + '\n')


import math
for _ in range(int(input())):
	ans = 1
	(x, y, k) = map(int, input().split())
	req_c = k + k * y
	p = 0
	new_req = req_c - x
	if new_req % (x - 1) != 0:
		ans += 1
	ans += new_req // (x - 1)
	print(ans + k)


def torch(x, y, k):
	a = k * (x + y) - 1
	b = x - 1
	if a % b == 0:
		return a // b
	else:
		return a // b + 1
x = int(input())
m = []
for i in range(x):
	y = input()
	z = y.split(' ')
	k = [int(t) for t in z]
	m.append(k)
for j in range(x):
	print(torch(m[j][0], m[j][1], m[j][2]))


import math
for i in range(int(input())):
	(x, y, k) = [int(x) for x in input().split()]
	count = k
	ans = k * y + k
	d = (ans - 1) // (x - 1)
	if d * (x - 1) != ans - 1:
		d = d + 1
	print(d + count)


for _ in range(int(input())):
	(x, y, k) = [int(w) for w in input().split()]
	print(((y + 1) * k - 1 + x - 2) // (x - 1) + k)


def Trader(x, y, k):
	sticks = y * k + k - 1
	if sticks % (x - 1) == 0:
		return sticks // (x - 1) + k
	else:
		return sticks // (x - 1) + k + 1
t = int(input())
for _ in range(t):
	l = [int(i) for i in input().split()]
	(x, y, k) = (l[0], l[1], l[2])
	print(Trader(x, y, k))


from math import ceil
for t in range(int(input())):

	def f(N, X):
		return N * X - (N - 1)

	def g(N, X, a0):
		return N * X - N + a0
	(x, y, k) = map(int, input().split())
	n = int(ceil((k * y - 1) / (x - 1)))
	stick_rem = f(n, x) - k * y
	if stick_rem == 0:
		n += 1
		stick_rem = x - 1
	if stick_rem >= k:
		print(n + k)
	else:
		r = int(ceil((k - stick_rem) / (x - 1)))
		print(r + k + n)


for i in range(int(input())):
	(x, y, k) = map(int, input().split())
	if (k * y + k - 1) % (x - 1) == 0:
		sticks = (k * y + k - 1) // (x - 1)
	else:
		sticks = (k * y + k - 1) // (x - 1) + 1
	trade = sticks + k
	print(trade)


import math
from sys import stdin, stdout
input = stdin.readline
t = int(input())
for i in range(t):
	(x, y, k) = [int(x) for x in input().split()]
	low = 0
	high = 10000000000000000000
	while low < high:
		mid = (low + high) // 2
		if mid - y * k < k:
			low = mid + 1
		else:
			high = mid
	ans = (low - 1) // (x - 1) + k
	if (low - 1) % (x - 1):
		ans += 1
	stdout.write(str(ans) + '\n')


import sys
input = sys.stdin.readline
I = lambda : list(map(int, input().split()))
(t,) = I()
for i in range(t):
	(x, y, k) = I()
	rq = k * y
	tot = k + rq
	an = (tot + x - 3) // (x - 1)
	print(an + k)


n_cases = int(input())
import math
for _ in range(n_cases):
	(x, y, k) = map(int, input().split())
	num = k * (y + 1) - 1
	den = x - 1
	if num % den == 0:
		print(num // den + k)
	else:
		print(num // den + k + 1)


for haaghfj in range(int(input())):
	(x, y, k) = list(map(int, input().split()))
	print(k + (y * k + k - 1 + x - 2) // (x - 1))


import math
t = int(input())
for tt in range(t):
	(x, y, k) = map(int, input().split())
	print(((y + 1) * k - 1 + x - 2) // (x - 1) + k)


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

def ceildiv(a, b):
	return -(-a // b)

def solve():
	(x, y, k) = invr()
	print(ceildiv((y + 1) * k - 1, x - 1) + k)

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(1, t + 1):
		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) + 2)
	for i in range(len(a)):
		q[a[i]] = q[a[i]] + 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

def factorial(n, m=1000000007):
	q = 1
	for i in range(n):
		q = q * (i + 1) % m
	return q
ONLINE_JUDGE = __debug__
if ONLINE_JUDGE:
	input = sys.stdin.readline
main()


def solve():
	(x, y, k) = map(int, input().split())
	r = y * k - 1 + k
	print(k + (r + x - 2) // (x - 1))
for i in range(int(input())):
	solve()


s = 0
t = int(input())
for kl in range(t):
	s = 0
	(x, y, h) = map(int, input().split())
	p = y * h + h - 1
	s += h
	o = (p - 1) // (x - 1) + 1
	print(s + o)


def solve(x, y, k):
	sticks = 0
	trade = 0
	total = k - 1 + k * y
	trade += total // (x - 1)
	trade += 1 if total % (x - 1) != 0 else 0
	trade += k
	print(trade)
T = int(input())
for _ in range(T):
	(x, y, k) = list(map(int, input().split(' ')))
	solve(x, y, k)


__ = int(input())
for _ in range(__):
	(a, b, c) = map(int, input().split())
	t = c + c * b
	if (t - a) % (a - 1) == 0:
		r = (t - a) // (a - 1) + 1
	else:
		r = (t - a) // (a - 1) + 2
	print(r + c)


import math
t = int(input())
while t > 0:
	t = t - 1
	l = []
	l = input().split()
	x = int(l[0])
	y = int(l[1])
	k = int(l[2])
	if (k * y + k - 1) % (x - 1) == 0:
		n = (k * y + k - 1) // (x - 1) + k
	else:
		n = (k * y + k - 1) // (x - 1) + k + 1
	print(n)


t = int(input())
while t > 0:
	(x, y, k) = [int(i) for i in input().split()]
	n1 = k + y * k - 1
	if n1 % (x - 1) == 0:
		print(n1 // (x - 1) + k)
	else:
		print(n1 // (x - 1) + k + 1)
	t -= 1


from math import ceil
from decimal import *

def get_ans(x, y, k):
	return ceil(Decimal(k * y + k - 1) / Decimal(x - 1)) + k

def dfs(G, v, curr):
	v.append(curr)
	max_d = 1
	v_max_d = []
	tr = False
	for node in range(n):
		if G[curr][node] != -1:
			if node not in v:
				tr = True
				d_v = dfs(G, v, node)
				if d_v[0] + 1 > max_d:
					max_d = d_v[0] + 1
					v_max_d = d_v[1]
	if not tr:
		return (1, v)
	return (max_d, v_max_d)

def bfs(G, start):
	v = []
	querry = []
	v.append(start)
	querry.append(start)
	depth = 0
	while querry:
		depth += 1
		curr = querry.pop(0)
		for node in range(n):
			if G[curr][node] != -1 and node not in v:
				v.append(node)
				querry.append(node)
	return (depth, v)
t = int(input())
anss = []
for _ in range(t):
	inp = list(map(int, input().split()))
	anss.append(get_ans(inp[0], inp[1], inp[2]))
for i in anss:
	print(i)


t = int(input())
while t:
	t += -1
	(x, y, k) = map(int, input().split())
	t1 = k * y + k - x
	t2 = x - 1
	t3 = t1 // t2 + bool(t1 % t2) + 1
	print(max(0, int(t3 + k)))


import math
_ = int(input())
for i in range(_):
	a = list(map(int, input().split()))
	x = a[0]
	y = a[1]
	k = a[2]
	st = k + k * y
	T = (st - 1) // (x - 1)
	if (st - 1) % (x - 1) > 0:
		T += 1
	print(int(k + T))


import math

def dtb(n):
	return bin(n).replace('0b', '')

def btd(n):
	return int(n, 2)
t = int(input())
for k in range(t):
	(x, y, z) = map(int, input().split())
	(su, count) = (1, 0)
	ans = (z * y + z - 1) // (x - 1)
	if (z * y + z - 1) % (x - 1) != 0:
		ans += 1
	ans += z
	print(ans)


for i in range(int(input())):
	(x, y, k) = map(int, input().split())
	an = 0
	an += k * y
	ctr = (an + (k - 1)) // (x - 1)
	if (an + (k - 1)) % (x - 1):
		ctr += 1
	print(k + ctr)


t = int(input())
for i in range(t):
	(x, y, k) = map(int, input().split())
	p = y * k + k - 1
	c = k
	if p % (x - 1) != 0:
		c += 1
	c += p // (x - 1)
	print(c)


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

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

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

def solve():
	(x, y, k) = map(int, inputi().split())
	needed = (y + 1) * k
	strade = (needed - 2) // (x - 1) + 1
	print(strade + k)

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


import math

def f(u, v):
	if u % v == 0:
		return u // v
	else:
		return u // v + 1
for _ in range(int(input())):
	(x, y, k) = list(map(int, input().split()))
	o = f(k * (y + 1) - 1, x - 1) + k
	print(o)


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

def nn():
	return int(input())

def li():
	return list(input())

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

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

def solve():
	(x, y, k) = mi()
	n_sticks = k + k * y
	n_move_1 = (n_sticks - 1 + x - 2) // (x - 1)
	n_move_2 = k
	print(n_move_1 + n_move_2)
q = nn()
for _ in range(q):
	solve()


t = int(input())
for i in range(0, t):
	(x, y, k) = (int(i) for i in input().split())
	req_k = k - 1 + k * y
	if req_k % (x - 1) > 0:
		print(req_k // (x - 1) + k + 1)
	else:
		print(req_k // (x - 1) + k)


import math
for i in range(int(input())):
	(x, y, k) = map(int, input().split())
	re = (1 + y) * k - 1 + x - 2
	c = re // (x - 1)
	print(c + k)


import sys
input = sys.stdin.readline
t = int(input())
for i in range(t):
	(x, y, k) = map(int, input().split())
	print((k * y + k - 1 + (x - 2)) // (x - 1) + k)


t = int(input())
for i in range(t):
	l = list(map(int, input().split(' ')))
	ans = l[2] + l[2] * l[1] - 1
	if ans % (l[0] - 1) == 0:
		ans = ans // (l[0] - 1)
	else:
		ans = ans // (l[0] - 1) + 1
	ans = ans + l[2]
	print(ans)


t = int(input())
for ttt in range(t):
	(x, y, k) = map(int, input().split())
	a = k * (y + 1) - 1
	b = a // (x - 1) + (a % (x - 1) != 0)
	print(k + b)


from sys import stdin, stdout

def INPUT():
	return list((int(i) for i in stdin.readline().split()))

def inp():
	return stdin.readline()

def out(x):
	return stdout.write(x)
import math
import random
import sys
for _ in range(int(input())):
	(x, y, k) = INPUT()
	ans = k
	p = k * (1 + y) - 1
	r = p % (x - 1)
	if r == 0:
		ans += p // (x - 1)
	else:
		ans += p // (x - 1) + 1
	print(ans)


import sys

def solution():
	T = int(input())
	for _ in range(T):
		line = input()
		x = int(line.split(' ')[0])
		y = int(line.split(' ')[1])
		k = int(line.split(' ')[2])
		result = helper(x, y, k)
		print(result)

def helper(x, y, k):
	totalSticksNeeded = k * y + k
	transactionForCoal = k
	totalSticksNeeded -= 1
	transactionForSticks = totalSticksNeeded // (x - 1)
	remainder = totalSticksNeeded % (x - 1)
	if remainder > 0:
		transactionForSticks += 1
	result = transactionForCoal + transactionForSticks
	return result
solution()


for i in range(int(input())):
	[x, y, k] = list(map(int, input().split()))
	req = k * (y + 1)
	first_exchange = 0
	first_exchange = (req - x) // (x - 1)
	first_exchange += 1
	if (req - x) % (x - 1) != 0:
		first_exchange += 1
	first_exchange += k
	if k == 0:
		first_exchange = 0
	print(first_exchange)


for i in range(int(input())):
	(x, y, k) = map(int, input().split())
	ans = 0
	tot = k * y + k - 1
	ans = tot // (x - 1)
	if tot % (x - 1) != 0:
		ans += 1
	print(ans + k)


import sys
input = sys.stdin.readline
n = int(input())
for i in range(n):
	sticks = 1
	(x, y, k) = map(int, input().split())
	ans = (k * (y + 1) - 1) // (x - 1)
	dp = (k * (y + 1) - 1) % (x - 1)
	if dp != 0:
		ans += 1
	print(ans + k)


t = int(input())
for _ in range(t):
	(x, y, k) = map(int, input().split())
	v1 = k * (y + 1) - x
	v2 = x - 1
	if v1 % v2 == 0:
		ttl = v1 // v2
	else:
		ttl = v1 // v2 + 1
	print(ttl + 1 + k)


results = []
for _ in range(int(input())):
	(x, y, k) = list(map(lambda x_: int(x_), input().split()))
	a = k * (y + 1) - 1
	b = x - 1
	if a % b:
		c = a // b + 1
	else:
		c = a // b
	results.append(c + k)
for i in results:
	print(i)


for t in range(int(input())):
	(x, y, k) = map(int, input().split())
	b = ((y + 1) * k - x) // (x - 1) + k + 1 + (not ((y + 1) * k - x) % (x - 1) == 0)
	print(b)


n = int(input())
i = 0
while i < n:
	(x, y, k) = map(int, input().split())
	print((y * k + k - 1 + (x - 1) - 1) // (x - 1) + k)
	i += 1


import math
for t in range(int(input())):
	(x, y, k) = map(int, input().split())
	total_wood_needed = k * (y + 1)
	total_wood_needed -= 1
	d = x - 1
	n = total_wood_needed // d
	if total_wood_needed % d != 0:
		n += 1
	ans = n + k
	print(ans)


def ceil(x, y):
	if x % y:
		return x // y + 1
	return x // y
import math
for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	t = ceil((y + 1) * k - 1, x - 1)
	print(t + k)


from math import ceil
for q in range(int(input())):
	(x, y, k) = map(int, input().split())
	st = 1
	res = 0
	need_st = k * y
	res += k
	m = ceil(need_st / (x - 1))
	res += m
	st += m * (x - 1)
	st -= need_st
	if k > st:
		m = ceil((k - st) / (x - 1))
		res += m
	print(res)


for j in range(int(input())):
	(a, b, c) = map(int, input().split())
	va = b * c + c - 1
	x = va // (a - 1)
	if va % (a - 1) != 0:
		x += 1
	print(x + c)


number_tests = int(input())
for _ in range(number_tests):
	(x, y, k) = map(int, input().split())
	x -= 1
	n = k * (1 + y)
	count = k + n // x
	sticks = 1 + x * ((n - 1) // x)
	while sticks < n:
		sticks += x
		count += 1
	if n % x == 0:
		count -= 1
	print(count)


from bisect import bisect_left as bl
from bisect import bisect_right as br
from heapq import heappush, heappop, heapify
import math
from collections import *
from functools import reduce, cmp_to_key
import sys
input = sys.stdin.readline
from itertools import accumulate
from functools import lru_cache
M = mod = 998244353

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

def inv_mod(n):
	return pow(n, mod - 2, mod)

def li():
	return [int(i) for i in input().rstrip('\n').split()]

def st():
	return input().rstrip('\n')

def val():
	return int(input().rstrip('\n'))

def li2():
	return [i for i in input().rstrip('\n')]

def li3():
	return [int(i) for i in input().rstrip('\n')]
x = y = k = 0

def give():
	global x, y, k
	sticksreq = k * (y + 1) - 1
	tot = 1
	x -= 1
	return sticksreq // x + (1 if sticksreq % x else 0) + k
for _ in range(val()):
	(x, y, k) = li()
	print(give())


def solve():
	(x, y, k) = map(int, input().split())
	ans = k
	fdel = k * (y + 1) - 1
	ans += (fdel - 1) // (x - 1)
	ans += 1
	print(ans)
for _ in range(int(input())):
	solve()


import math
for _ in range(int(input())):
	(stick, coal, torch) = map(int, input().split())
	count = 0
	stick -= 1
	net1 = coal * torch
	net1 /= stick
	net1 = math.ceil(net1)
	count += net1
	count += torch
	stick_left = 1 + net1 * stick - coal * torch
	net2 = (torch - stick_left) / stick
	net2 = math.ceil(net2)
	count += net2
	print(count)


import math
t = int(input())
for q in range(t):
	(x, y, k) = map(int, input().split())
	num = (y + 1) * k - 1
	de = x - 1
	ans = (num + de - 1) // de
	print(ans + k)


t = int(input())
for _ in range(t):
	(x, y, k) = map(int, input().split())
	if x == 1:
		continue
	print((k + k * y + x - 3) // (x - 1) + k)


a = int(input())
for i in range(a):
	l = list(map(int, input().split()))
	x = l[0]
	y = l[1]
	m = l[2]
	palka = m * y + m - 1
	ans = 0
	ans = palka // (x - 1)
	if palka % (x - 1) != 0:
		ans += 1
	print(ans + m)


t = int(input())
for i in range(t):
	(x, y, k) = map(int, input().split())
	b = y * k + k - 1
	d = x - 1
	l = k + (b + d - 1) // d
	print(l)


t = int(input())
while t:
	t -= 1
	(x, y, k) = map(int, input().split())
	sticks_reqires = y * k + k
	total = (sticks_reqires - 1) // (x - 1)
	count = total + ((sticks_reqires - 1) % (x - 1) > 0)
	print(count + k)


from decimal import *

def solve():
	(x, y, k) = map(int, input().split())
	a = Decimal(k * y + k - 1)
	b = Decimal(x - 1)
	n = a / b + (a % b != 0)
	print(int(n) + k)
t = int(input())
i = 0
while i < t:
	solve()
	i += 1


t = int(input())
while t != 0:
	(x, y, k) = map(int, input().split())
	sticks = k * y + k - 1
	(total, rem) = divmod(sticks, x - 1)
	if rem:
		total += 1
	print(total + k)
	t -= 1


import math
t = int(input())
for tc in range(t):
	(x, y, k) = [int(x) for x in input().split()]
	ans = math.ceil((k * y + k - 1) // (x - 1))
	if ans * (x - 1) + 1 < k * y + k:
		ans += 1
	print(ans + k)


from collections import Counter
import string
import math
import sys

def array_int():
	return [int(i) for i in sys.stdin.readline().split()]

def vary(number_of_variables):
	if number_of_variables == 1:
		return int(sys.stdin.readline())
	if number_of_variables >= 2:
		return map(int, sys.stdin.readline().split())

def makedict(var):
	return dict(Counter(var))
from fractions import Fraction
mod = 100000007
for _ in range(vary(1)):
	(x, y, k) = vary(3)
	if (k * y + k - 1) % (x - 1) == 0:
		print((k * y + k - 1) // (x - 1) + k)
	else:
		print((k * y + k - 1) // (x - 1) + k + 1)


for y in range(int(input())):
	(x, y, k) = map(int, input().split())
	cnt = k
	req = k + k * y
	if (req - 1) % (x - 1) == 0:
		cnt += (req - 1) // (x - 1)
	else:
		cnt += (req - 1) // (x - 1) + 1
	print(cnt)


t = int(input())
for _ in range(t):
	(x, y, k) = map(int, input().split(' '))
	st = k * (y + 1)
	a = (st - 1) // (x - 1)
	ans = k + a
	if 1 + a * (x - 1) < k * y + k:
		ans += 1
	print(ans)


t = int(input())
l = []
for i in range(t):
	(x, y, k) = map(int, input().split())
	sum = (k * (y + 1) + x - 3) // (x - 1) + k
	l.append(sum)
for i in range(t):
	print(l[i])


MOD = 1000000007
from collections import defaultdict as dd, Counter, deque

def si():
	return input()

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

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

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

def out(v):
	print(v)

def spout():
	print(v, end=' ')

def d2b(n):
	return bin(n).replace('0b', '')

def twod(n, m, num):
	return [[num for x in range(m)] for y in range(n)]

def vow():
	return ['a', 'e', 'i', 'o', 'u']

def let():
	return [chr(i) for i in range(97, 123)]

def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

def ispow2(x):
	return x and (not x & x - 1)

def prime_factors(n):
	i = 2
	factors = []
	while i * i <= n:
		if n % i:
			i += 1
		else:
			n //= i
			factors.append(i)
	if n > 1:
		factors.append(n)
	return list(factors)

def prod(a):
	p = 1
	for i in a:
		p *= i
	return p
t = ii()
while t:
	t -= 1
	(x, y, k) = mi()
	if (k * (y + 1) - 1) % (x - 1) == 0:
		print((k * (y + 1) - 1) // (x - 1) + k)
	else:
		print((k * (y + 1) - 1) // (x - 1) + k + 1)


t = int(input())
while t:

	def ceil_div(a, b):
		return (a + b - 1) // b
	(x, y, k) = map(int, input().split())
	a = k * y + k
	b = x - 1
	trades = ceil_div(a - 1, b) + k
	print(trades)
	t -= 1


import math
testcases = int(input())
for i in range(0, testcases):
	xyk = input()
	m = xyk.split()
	x = int(m[0])
	y = int(m[1])
	k = int(m[2])
	s = 0
	r = (k * y + k - 1) % (x - 1)
	if r == 0:
		s = (k * y + k - 1) // (x - 1)
	else:
		s = 1 + (k * y + k - 1) // (x - 1)
	t = k + s
	print(t)


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()):
		(x, y, k) = mi()
		n = (k * y + k - 1) // (x - 1)
		rm = (k * y + k - 1) % (x - 1)
		if rm:
			print(n + k + 1)
		else:
			print(n + k)
main()


t = int(input())
for i in range(t):
	(x, y, k) = map(int, input().split())
	n = (k * (y + 1) - 1) // (x - 1)
	if n * x - n + 1 < k * y + k:
		print(n + k + 1)
	else:
		print(n + k)


def operation(data):
	(x, y, k) = data
	answer = (y * k + k - 1) // (x - 1) + k
	if (y * k + k - 1) % (x - 1) == 0:
		return answer
	else:
		return answer + 1
t = int(input())
listResults = []
for i in range(t):
	data = list(map(int, input().split()))
	result = operation(data)
	listResults.append(result)
for i in listResults:
	print(i)


import sys
ii = lambda : sys.stdin.readline().strip()
idata = lambda : [int(x) for x in ii().split()]

def solveA():
	(x, y, k) = idata()
	data = y * k - 1 + k
	print(k + (data + x - 2) // (x - 1))
	return

def solveB():
	n = int(ii())
	data = idata()
	l = idata()
for t in range(int(ii())):
	solveA()


t = int(input())
res = []
for i in range(t):
	(x, y, k) = map(int, input().split())
	ns = (y + 1) * k - 1 + x - 2
	nt = ns // (x - 1) + k
	res.append(nt)
for i in res:
	print(i)


tt = int(input())
for i in range(tt):
	(x, y, k) = map(int, input().split())
	need = y * k + k

	def f(m):
		m = m - k
		if 1 + m * (x - 1) >= need:
			return True
		else:
			return False
	(lo, hi) = (0, 2e+18)
	while lo < hi:
		m = int((lo + hi) // 2)
		if f(m):
			hi = m
		else:
			lo = m + 1
	print(int(lo))


import decimal
noOfTestCases = int(input())
for testCase in range(noOfTestCases):
	(x, y, k) = [int(i) for i in input().split()]
	temp = (decimal.Decimal(k * y + k - 1) / decimal.Decimal(x - 1)).to_integral_exact(rounding=decimal.ROUND_CEILING) + k
	print(temp)


import sys as _sys

def main():
	t = int(input())
	for i_t in range(t):
		(x, y, k) = _read_ints()
		result = find_min_trades_number_to_craft_n_torches(torches_n=k, sticks_by_stick=x, coal_cost=y)
		print(result)

def _read_line():
	result = _sys.stdin.readline()
	assert result[-1] == '\n'
	return result[:-1]

def _read_ints():
	return map(int, _read_line().split(' '))

def find_min_trades_number_to_craft_n_torches(torches_n, sticks_by_stick, coal_cost):
	curr_sticks_amount = 1
	necessary_sticks_amount = torches_n * coal_cost + torches_n
	curr_trades_n = _ceil_div_ints(necessary_sticks_amount - curr_sticks_amount, sticks_by_stick - 1)
	curr_trades_n += torches_n
	return curr_trades_n

def _ceil_div_ints(x, y):
	assert y > 0
	result = x // y
	if x % y > 0:
		result += 1
	return result
main()


t = int(input())
p = []
for i in range(t):
	r = list(map(int, input().split()))
	p.append(r)

def tully(x, y, k):
	total_sticks = k * (y + 1)
	steps = total_sticks // (x - 1)
	flag = 1
	if (total_sticks - x) % (x - 1) == 0:
		steps -= 1
	steps += k
	if total_sticks % (x - 1) != 0:
		steps += 1
	return steps
for i in range(t):
	e = tully(p[i][0], p[i][1], p[i][2])
	print(e)


t = int(input())
for tc in range(t):
	(x, y, k) = map(int, input().split())
	count = (k * (y + 1) - x) // (x - 1)
	if (k * (y + 1) - x) % (x - 1) != 0:
		count += 1
	count += k + 1
	print(count)


ansl = []
for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	need = y * k + k
	need_add = (need - 1 - 1) // (x - 1) + 1
	ans = need_add + k
	ansl.append(ans)
for ans in ansl:
	print(ans)


import sys
for line in sys.stdin:
	numbers = [int(x) for x in line.strip().split()]
	if len(numbers) == 1:
		continue
	else:
		a = numbers[0]
		b = numbers[1]
		c = numbers[2]
		constant = a - 1
		n = (c * b + c - 1) // constant
		if (c * b + c - 1) % constant != 0:
			n += 1
		sys.stdout.write(str(int(n + c)) + '\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()):
	(x, y, k) = MI()
	a = (k * (y + 1) - 1 + x - 2) // (x - 1)
	print(a + k)


for i in range(int(input())):
	(x, y, k) = map(int, input().split())
	a = k * y + k
	if a % (x - 1) <= 1:
		if x == 2:
			print(a // (x - 1) + k - 1)
		else:
			print(a // (x - 1) + k)
	else:
		print(a // (x - 1) + 1 + k)


t = int(input())
for i in range(t):
	(x, y, k) = list(map(int, input().split()))
	a = (k * (y + 1) - 1) // (x - 1)
	if (k * (y + 1) - 1) % (x - 1) != 0:
		a = a + 1
	print(int(a + k))


def solve():
	(x, y, k) = map(int, input().split())
	stick = k + k * y
	temp = (stick - 1) // (x - 1)
	if (stick - 1) % (x - 1) != 0:
		temp = int(temp) + 1
	print(temp + k)
for i in range(int(input())):
	solve()


from sys import stdin, stdout
t = int(stdin.readline())
for i in range(t):
	(x, y, k) = stdin.readline().split()
	x = int(x)
	y = int(y)
	k = int(k)
	low = 1
	high = 1000000000000000000000000000000000
	ans = -1
	while low <= high:
		mid = (low + high) // 2
		if mid * x - (mid - 1) - y * k >= k:
			ans = mid
			high = mid - 1
		else:
			low = mid + 1
	stdout.write(str(ans + k) + '\n')


t = int(input())
import math
for _ in range(t):
	(x, y, k) = map(int, input().split())
	i = (k * y + k - 1) // (x - 1)
	if i * (x - 1) < k * y + k - 1:
		i += 1
	print(i + k)


import math
T = int(input())
for _ in range(T):
	(x, y, k) = map(int, input().split())
	tt = y * k
	ans = k
	tt = tt + k - 1
	ans = ans + tt // (x - 1)
	if tt % (x - 1) != 0:
		ans = ans + 1
	print(ans)


import math

def min_trades(x, y, k):
	stick_req = k + y * k - 1
	return -(-stick_req // (x - 1)) + k
t = int(input())
for i in range(t):
	(x, y, k) = list(map(int, input().split()))
	print(min_trades(x, y, k))


from sys import stdin

class Input:

	def __init__(self):
		self.next = self.readline()

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

	def line(self):
		try:
			return self.next
		finally:
			self.next = self.readline()

	def array(self, sep=' ', cast=int):
		return list(map(cast, self.line().split(sep=sep)))

	def known_tests(self):
		(num_of_cases,) = self.array()
		for case in range(num_of_cases):
			yield self

	def unknown_tests(self):
		while self.next:
			yield self

class Problem:

	def __init__(self, input):
		(x, y, k) = input.array()
		m = k * y + k
		n = k + (m - 1 + (x - 1 - 1)) // (x - 1)
		print(n)
for tc in Input().known_tests():
	Problem(tc)


import sys
input = sys.stdin.buffer.readline
t = int(input())
for _ in range(t):
	(x, y, k) = map(int, input().split())
	need = k * (y + 1)
	add_ = x - 1
	ans = 0
	ans += -(-(need - 1) // add_)
	print(ans + k)


t = int(input())
for _ in range(t):
	(x, y, k) = map(int, input().split())
	ans = (k + k * y - 1) // (x - 1)
	fans = ans * (x - 1) + 1
	if fans >= k + k * y:
		print(ans + k)
	else:
		print(ans + k + 1)


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())
t = inp()
while t > 0:
	(x, y, k) = map(int, input().split())
	ans = k
	dep = y * k + k - 1
	if dep % (x - 1) == 0:
		ans += dep // (x - 1)
	else:
		ans += dep // (x - 1) + 1
	print(ans)
	t -= 1


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	(x, y, k) = [int(x) for x in input().split()]
	required_sticks = k + k * y
	moves_for_sticks = (required_sticks - 1) // (x - 1) + ((required_sticks - 1) % (x - 1) != 0)
	print(moves_for_sticks + k)


import math
from decimal import *
inputed = []
count = int(input())
linesPer = 1
for i in range(count * linesPer):
	inputed.append(input())
t = 0
for i in range(count):
	inputed[t] = inputed[t].split(' ')
	inputed[t] = [int(x) for x in inputed[t]]
	x = Decimal(inputed[t][0])
	y = Decimal(inputed[t][1])
	k = Decimal(inputed[t][2])
	trades = ((y + 1) * k - 1) / (x - 1) + k
	print(math.ceil(trades))
	t += linesPer


for i in range(int(input())):
	(x, y, k) = map(int, input().split())
	count = (k * y + (k - 1)) // (x - 1) + int((k * y + (k - 1)) % (x - 1) > 0) + k
	print(count)


from collections import *
import sys

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

def rl():
	return list(map(int, input().split()))
t = ri()
for _ in range(t):
	(x, y, k) = rl()
	temp = (k * y + k - 1) // (1 - x)
	ans = -temp + k
	print(ans)


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 ceil, floor
from copy import *
from collections import deque, defaultdict
from collections import Counter as counter
from itertools import combinations
from itertools import permutations as permutate
from bisect import bisect_left as bl
from operator import *
from bisect import bisect_right as br
from bisect import bisect
BUFSIZE = 8192
from sys import stderr

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))
from types import GeneratorType

def iterative(f, stack=[]):

	def wrapped_func(*args, **kwargs):
		if stack:
			return f(*args, **kwargs)
		to = f(*args, **kwargs)
		while True:
			if type(to) is GeneratorType:
				stack.append(to)
				to = next(to)
				continue
			stack.pop()
			if not stack:
				break
			to = stack[-1].send(to)
		return to
	return wrapped_func
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 fsep():
	return map(float, inp().split())

def nextline():
	out('\n')

def testcase(t):
	for p in range(t):
		solve()

def pow(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
from functools import reduce

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

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

def comb(n, r):
	if n < r:
		return 0
	else:
		return fac[n] * (finv[r] * finv[n - r] % mod) % mod

def prefix_sum(ar):
	return list(accumulate(ar))

def suffix_sum(ar):
	return list(accumulate(ar[::-1]))[::-1]

def N():
	return int(inp())
from collections import defaultdict
sys.setrecursionlimit(300000)

def numberOfSetBits(i):
	i = i - (i >> 1 & 1431655765)
	i = (i & 858993459) + (i >> 2 & 858993459)
	return ((i + (i >> 4) & 252645135) * 16843009 & 4294967295) >> 24
from math import factorial

def solve():
	(x, y, k) = sep()
	t = (k * (y + 1) - 1 + x - 2) // (x - 1) + k
	print(t)
testcase(int(inp()))


from math import ceil, floor
from decimal import Decimal
t = int(input())
for _ in range(t):
	(x, y, k) = map(int, input().split())
	total = Decimal(k + y * k - 1)
	raw = total / (x - 1)
	print(ceil(raw + k))


for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	if ((y + 1) * k - 1) % (x - 1) == 0:
		one = ((y + 1) * k - 1) // (x - 1)
	else:
		one = ((y + 1) * k - 1) // (x - 1) + 1
	two = k
	print(one + two)


t = int(input())
for _ in range(t):
	(x, y, k) = [int(i) for i in input().split()]
	sticks_needed = k * (1 + y) - 1
	sticks_delta = x - 1
	print(sticks_needed // sticks_delta + (sticks_needed % sticks_delta != 0) + k)


for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	sticks = (y + 1) * k - 1
	changes = (sticks - 1) // (x - 1) + 1 + k
	print(changes)


for _ in ' ' * int(input()):
	(a, b, c) = map(int, input().split())
	print(c + (b * c + c - 1 + a - 2) // (a - 1))


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

def str(x=b''):
	return x if type(x) is bytes else _str(x).encode()

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 inp():
	return sys.stdin.readline().rstrip('\n')

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

def itg():
	return int(sys.stdin.readline())
for __ in range(itg()):
	(x, y, k) = mpint()
	z = k * (y + 1)
	op1 = z // (x - 1)
	ans = k + op1
	if 1 + (x - 1) * op1 < z:
		ans += 1
	elif 1 + (x - 1) * (op1 - 1) >= z:
		ans -= 1
	print(ans)


for _ in range(int(input())):
	(x, y, n) = map(int, input().split())
	number = n - 1 + y * n
	total = number // (x - 1)
	if total * (x - 1) < number:
		total += 1
	print(total + n)


def calc(x, y, k):
	s = k * (y + 1) - 1
	p = x - 1
	if s % p == 0:
		return int(s // p) + k
	else:
		return int(s // p + k + 1)
for i in range(int(input())):
	(x, y, k) = map(int, input().split(' '))
	print(calc(x, y, k))


import sys
IN = sys.stdin.readline
out = []
for _ in range(int(IN())):
	(x, y, k) = map(int, IN().split())
	out.append(str((k * (y + 1) - 1 + x - 1 - 1) // (x - 1) + k))
print('\n'.join(out))


t = int(input())
for _ in range(t):
	(s, c, t) = map(int, input().split())
	total = c * t + t
	total -= 1
	temp = total // (s - 1)
	if temp * (s - 1) == total:
		op = temp
	else:
		op = temp + 1
	print(op + t)


for w in range(int(input())):
	(x, y, k) = tuple(map(int, input().split()))
	t = 0
	x1 = 1
	y1 = 0
	t += 1
	x1 = x
	t += 1
	x1 -= y
	y1 += 1
	if x1 >= k and y1 >= k:
		print(2)
	else:
		t = 1
		x1 = x
		y1 = 0
		if True:
			x1 -= k * y
			t += k
			if x1 >= k:
				print(t)
			elif (k - x1) % (x - 1) == 0:
				print(t + (k - x1) // (x - 1))
			else:
				print(t + (k - x1) // (x - 1) + 1)


import math
from decimal import *
import random
for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	p1 = int(math.ceil(y * z - 1) / (x - 1))
	rem = p1 * (x - 1) - (y * z - 1)
	if rem == 0:
		p1 += 1
		rem += x - 1
	p2 = int(math.ceil((z - rem) / (x - 1)))
	print(p1 + p2 + z)


t = int(input())
for i in range(t):
	(x, y, z) = map(int, input().split())
	x = x - 1
	sum1 = y * z + z - 1
	if sum1 % x == 0:
		print(int(sum1 // x + z))
	else:
		print(int(sum1 // x) + 1 + z)


a = int(input())
for i in range(a):
	b = input().split(' ')
	for i in range(len(b)):
		b[i] = int(b[i])
	if (b[2] * b[1] + b[2] - 1) % (b[0] - 1) != 0:
		print((b[2] * b[1] + b[2] - 1) // (b[0] - 1) + b[2] + 1)
	else:
		print((b[2] * b[1] + b[2] - 1) // (b[0] - 1) + b[2])


import math
t = int(input())
while t:
	(x, y, k) = map(int, input().split())
	total = k * y + k
	ans = total - x
	if ans % (x - 1) == 0:
		ans1 = ans // (x - 1)
		print(ans1 + k + 1)
	else:
		ans1 = ans // (x - 1)
		print(ans1 + k + 2)
	t = t - 1


from functools import lru_cache
from sys import stdin, stdout
import sys
from math import *
input = stdin.readline
for __ in range(int(input())):
	(x, y, k) = map(int, input().split())
	temp = k * y
	l = 0
	r = int(1e+20)
	ans = 0
	while l <= r:
		m = (l + r) // 2
		if (x - 1) * m + 1 - k >= temp:
			ans = m
			r = m - 1
		else:
			l = m + 1
	print(ans + k)


import math
n = int(input())
x = [0] * n
y = [0] * n
k = [0] * n
for i in range(n):
	(x[i], y[i], k[i]) = list(map(int, input().split()))
deals = 0
for i in range(n):
	print(k[i] - (1 - y[i] * k[i] - k[i]) // (x[i] - 1))


from math import ceil

def run():
	(x, y, k) = map(int, input().split())
	m = (y + 1) * k - 1
	if m % (x - 1) == 0:
		m = m // (x - 1)
		print(m + k)
	else:
		m = m // (x - 1)
		print(m + k + 1)
T = 1
if T:
	for i in range(int(input())):
		run()
else:
	run()


t = int(input())

def kek(a, b):
	return (a + b - 1) // b
from math import ceil
for i in range(t):
	(a, b, c) = map(int, input().split())
	bb = kek(b * c + c - 1, a - 1)
	bb += c
	print(bb)


for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	lo = 1
	hi = 10 ** 24
	ans = 0
	base = k + k * y
	while lo <= hi:
		mid = (lo + hi) // 2
		tot = (mid - 1) * (x - 1) + x
		if tot >= base:
			hi = mid - 1
			ans = mid
		else:
			lo = mid + 1
	print(ans + k)


t = int(input())
for i in range(t):
	a = list(map(int, input().split()))
	x = a[0]
	y = a[1]
	k = a[2]
	minKol = (k * y + k - 1) // (x - 1)
	if (k * y + k - 1) % (x - 1) == 0:
		otv = minKol + k
	else:
		otv = minKol + k + 1
	print(otv)


import decimal
import math
t = int(input())
for i in range(t):
	(x, y, k) = input().split()
	(x, y, k) = (int(x), int(y), int(k))
	count = (k * y + k - 1) // (x - 1)
	if count * (x - 1) + 1 < k * y + k:
		count += 1
	print(count + k)


from sys import stdin
input = stdin.readline
for _ in range(int(input())):
	(a, b, c) = map(int, input().split())
	print(((b + 1) * c + a - 3) // (a - 1) + c)


import sys
input = sys.stdin.readline

def solve():
	(x, y, k) = map(int, input().split())
	need = (y + 1) * k
	print((need - 1 + x - 2) // (x - 1) + k)
t = int(input())
while t:
	t -= 1
	solve()


def func(ind, s1, s2, b, k, dp):
	if dp[ind][b][k] == -1:
		if ind == 0:
			dp[ind][b][k] = 0
		elif k == 0:
			if s1[ind - 1] == s2[0]:
				dp[ind][b][k] = b + func(ind - 1, s1, s2, b, k, dp)
			elif s1[ind - 1] == s2[1]:
				dp[ind][b][k] = func(ind - 1, s1, s2, b + 1, k, dp)
			else:
				dp[ind][b][k] = func(ind - 1, s1, s2, b, k, dp)
		elif s1[ind - 1] == s2[0]:
			dp[ind][b][k] = max(func(ind - 1, s1, s2, b + 1, k - 1, dp), b + func(ind - 1, s1, s2, b, k, dp))
		elif s1[ind - 1] == s2[1]:
			dp[ind][b][k] = max(b + func(ind - 1, s1, s2, b, k - 1, dp), func(ind - 1, s1, s2, b + 1, k, dp))
		else:
			dp[ind][b][k] = max(b + func(ind - 1, s1, s2, b, k - 1, dp), func(ind - 1, s1, s2, b + 1, k - 1, dp), func(ind - 1, s1, s2, b, k, dp))
	return dp[ind][b][k]
for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	ans = ((y + 1) * k - 1) // (x - 1) + k
	if ((y + 1) * k - 1) % (x - 1) == 0:
		print(ans)
	else:
		print(ans + 1)


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

def lower_bound(li, num):
	answer = -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 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 = mpos(sum_so_far, current_sum)
	return sum_so_far

def pref(li):
	pref_sum = [0]
	for i in li:
		pref_sum.append(pref_sum[-1] + i)
	return pref_sum

def graph(n, m):
	adj = dict()
	for i in range(1, n + 1):
		adj.setdefault(i, 0)
	for i in range(m):
		(a, b) = map(int, input().split())
		adj[a] += 1
		adj[b] += 1
	return adj
import sys
import threading
from math import *
for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	ans = (k * y + k - 1) // (x - 1) + (1 if (k * y + k - 1) % (x - 1) else 0)
	print(ans + k)


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, log
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, end='\n'):
	sys.stdout.write(str(var) + end)

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())):
	(x, y, k) = sp()
	temp = k * (y + 1)
	answer = (temp - 1) // (x - 1) + (1 if (temp - 1) % (x - 1) else 0) + k
	out(answer)


for T in range(int(input())):
	(x, y, k) = map(int, input().split())
	val = k * y + k
	ans = val // (x - 1) - 1
	val1 = ans * (x - 1)
	if val1 + 1 != val:
		ans += 1
		while 1:
			val1 = ans * (x - 1)
			if val1 + 1 < val:
				ans += 1
			else:
				break
	print(ans + k)


import sys
import math
input = sys.stdin.readline
from collections import deque
from queue import LifoQueue

def binary_search(a, n):
	L = 0
	R = len(a) - 1
	while L <= R:
		mid = L + (R - L) // 2
		if a[mid] == n:
			return mid
		elif a[mid] < n:
			L = mid + 1
		else:
			R = mid - 1
	return -1
for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	ans = k
	st = (y + 1) * k - 1
	if st % (x - 1) == 0:
		print(ans + st // (x - 1))
	else:
		ans += st // (x - 1) + 1
		print(ans)


import math
T = int(input())
for _ in range(T):
	(x, y, n) = map(int, input().split())
	sticks = n + n * y
	if (sticks - x) % (x - 1) == 0:
		steps = 1 + (sticks - x) // (x - 1)
		steps += n
		print(steps)
	else:
		steps = 1 + math.ceil((sticks - x) // (x - 1))
		steps += n
		print(steps + 1)


from collections import defaultdict
from queue import deque

def arrinp():
	return [*list(map(int, input().split(' ')))]

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

def intinp():
	return int(input())

def solution():
	(x, y, k) = mulinp()
	num = y * k + k
	ans = (num - 1) // (x - 1)
	if (num - 1) % (x - 1) != 0:
		ans += 1
	ans += k
	print(ans)
testcases = 1
testcases = int(input())
for _ in range(testcases):
	solution()


t = int(input())
for q in range(t):
	ch = input()
	L = [int(i) for i in ch.split()]
	(x, y, k) = (L[0], L[1], L[2])
	a = (k * (1 + y) - x) // (x - 1)
	if (k * (1 + y) - x) % (x - 1) == 0:
		print(a + k + 1)
	else:
		print(a + k + 2)


n = int(input())
for i in range(n):
	arr = input().split()
	x = int(arr[0])
	y = int(arr[1])
	k = int(arr[2])
	ans = 0
	amount = k * y + k - 1
	ans += amount // (x - 1)
	if amount % (x - 1) != 0:
		ans += 1
	ans += k
	print(ans)


for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	z = k * y + k - 1
	ans = k
	w = z // (x - 1)
	if z % (x - 1) != 0:
		ans += 1
	ans += w
	print(ans)


from math import ceil
for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	tr = k
	st = 1 - k * y
	aux = (k + k * y - 1) // (x - 1)
	st += (x - 1) * aux
	if st >= k:
		print(tr + aux)
	else:
		print(tr + aux + 1)


for t in range(int(input())):
	(x, y, k) = map(int, input().split())
	if x == 2:
		print(2 * k + k * y - 1)
	else:
		param = k + k * y - 1
		if param % (x - 1) == 0:
			print(param // (x - 1) + k)
		else:
			print(param // (x - 1) + k + 1)


def read_int():
	return int(input())

def read_ints():
	return map(int, input().split(' '))
a = read_int()
for i in range(a):
	(x, y, k) = read_ints()
	tradeForSticks = (k + k * y - 1 + x - 2) // (x - 1)
	totalTrade = tradeForSticks + k
	print(totalTrade)


def ceil_div(a, b):
	return (a + b - 1) // b
query = int(input())
for _ in range(query):
	(x, y, k) = map(int, input().split())
	sticks = k * (y + 1) - 1
	print(ceil_div(sticks, x - 1) + k)


from math import ceil
for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	cnt = (k + k * y - 1) // (x - 1)
	f = 0
	if (k + k * y - 1) % (x - 1) != 0:
		f = 1
	if f == 1:
		cnt = cnt + 1
	print(cnt + k)


import math
t = int(input())
for _ in range(t):
	(x, y, k) = map(int, input().split())
	n = math.ceil((k * y - 1) / (x - 1))
	result = n
	s = 1 + (x - 1) * n
	result += k
	s -= k * y
	np = math.ceil((k - s) / (x - 1))
	result += np
	print(result)


for i in range(int(input())):
	(x, y, k) = map(int, input().split())
	a = k * y + k
	print((a + x - 3) // (x - 1) + k)


from sys import *
from collections import *
from math import *

def dbg(*args):
	print(*args, file=stderr)

def dbv(var_name):
	print(f'{var_name} = {eval(var_name)}', file=stderr)

def mis():
	return map(int, input().split())
for _ in range(int(input())):
	(x, y, k) = mis()
	st = 1
	st_for_c = k * y
	tr = 0
	tr_to_get_enough_st_for_c = ceil((st_for_c - 1) / (x - 1))
	tr += tr_to_get_enough_st_for_c
	st = 1 + (x - 1) * tr_to_get_enough_st_for_c - st_for_c
	if st == 0:
		tr += 1
		st = x - 1
	tr_to_get_the_rest = ceil((k - st) / (x - 1))
	print(tr_to_get_the_rest + k + tr)


import math
import collections
from sys import stdin, stdout, setrecursionlimit
from bisect import bisect_left as bsl
from bisect import bisect_right as bsr
import heapq as hq
setrecursionlimit(2 ** 20)
t = 1
t = int(stdin.readline())
for _ in range(t):
	(x, y, k) = list(map(int, stdin.readline().rstrip().split()))
	s = k
	x -= 1
	f = (k - 1 + s * y) // x
	if (k - 1 + s * y) % x != 0:
		f += 1
	print(f + s)


t = int(input())
while t > 0:
	(x, y, k) = map(int, input().split())
	y += 1
	x -= 1
	y *= k
	y -= 1
	y += x - 1
	y = y // x
	print(k + y)
	t -= 1


for _ in range(int(input())):
	(X, Y, K) = [int(i) for i in input().split(' ')]
	sum = K * Y + K - 1
	if sum % (X - 1) == 0:
		print(sum // (X - 1) + K)
	else:
		print(sum // (X - 1) + 1 + K)


for _ in range(int(input())):
	(x, y, k) = list(map(int, input().split()))
	s = k * (y + 1) // (x - 1)
	s -= 2
	while s * (x - 1) + 1 < k * y + k:
		s += 1
	print(s + k)


for _ in range(int(input())):
	(x, y, k) = list(map(int, input().split()))
	answer = 0
	sticks = k + k * y
	i = 0
	trade = k
	while True:
		if x ** i > sticks:
			i -= 1
			break
		i += 1
	preans = x ** i - 1
	preans //= x - 1
	sticks_req = sticks - x ** i
	sticks = x ** i
	trade += preans
	if sticks_req % (x - 1) == 0:
		trade += sticks_req // (x - 1)
	else:
		trade += sticks_req // (x - 1) + 1
	print(trade)


import math
t = int(input())
for i in range(0, t):
	(x, y, k) = map(int, input().split())
	totx = y * k + k - 1
	xt = -(-totx // (x - 1))
	ans = xt + k
	print(ans)


t = int(input())
from math import floor
while t:
	l = input().split()
	(x, y, k) = (int(l[0]), int(l[1]), int(l[2]))
	sticks = 1
	trades = k * (y + 1) - 1
	if trades % (x - 1) == 0:
		trades = trades // (x - 1)
	else:
		trades = trades // (x - 1) + 1
	print(trades + k)
	t -= 1


def calc():
	(x, y, k) = map(int, input().split())
	coal = k
	sticknum = k * y + k - 1
	tot = sticknum // (x - 1)
	if sticknum % (x - 1):
		tot += 1
	tot += k
	return tot
testcase = int(input())
for i in range(testcase):
	print(calc())


(T,) = map(int, input().split())
for _ in range(T):
	(a, b, k) = map(int, input().split())
	c = -(-(k * b + k - 1) // (a - 1))
	print(c + k)


def calc(x, y, k):
	return (y * k + k - 1 + x - 2) // (x - 1)
t = int(input())
for _ in range(t):
	(x, y, k) = map(int, input().split())
	print(calc(x, y, k) + k)


for z in range(int(input())):
	(x, y, k) = map(int, input().split())
	x -= 1
	y += 1
	print(k - -(y * k - 1) // x)


def myceil(x, y):
	return int((x + y - 1) // y)
n = int(input())
for i in range(n):
	(x, y, k) = map(int, input().split(' '))
	ans = myceil(k - 1 + y * k, x - 1) + k
	print(ans)


for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	c = y * k
	d = x - 1
	a = c - x + k
	h = 0
	if a % d == 0:
		h = a // d + 1
	else:
		h = a // d + 2
	print(h + k)


def main() -> None:
	for test in range(int(input())):
		(x, y, k) = map(int, input().split())
		print((k + y * k - 1 + x - 2) // (x - 1) + k)
main()


import os
import heapq
import sys, threading
import math
import bisect
import operator
from collections import defaultdict
from io import BytesIO, IOBase

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

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

def inar():
	return [int(k) for k in input().split()]

def lcm(num1, num2):
	return num1 * num2 // gcd(num1, num2)

def main():
	t = int(input())
	for _ in range(t):
		(x, y, k) = inar()
		res = k - x + k * y
		take = res // (x - 1)
		if res % (x - 1) > 0:
			take += 1
		print(take + k + 1)
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()


n = int(input())
for i in range(n):
	a = input()
	(x, y, k) = a.split(' ')
	(x, y, k) = (int(x), int(y), int(k))
	print((k * y + k - 1 + x - 2) // (x - 1) + k)


import sys
from sys import stdin
import math
import fractions

def iinput():
	return int(input())

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

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

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

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

def flinput():
	return list(map(int, stdin.readline().strip().split()))
for _ in range(iinput()):
	(x, y, k) = minput()
	xx = x - 1
	yy = k * y
	kk = k
	k = k + yy
	f = fractions.Fraction(k - 1, xx)
	q = math.ceil(f)
	print(q + kk)


T = int(input())
while T > 0:
	(x, y, k) = map(int, input().split())
	need = k + y * k
	time = (k * y + k - 1) // (x - 1)
	if (k * y + k - 1) % (x - 1) != 0:
		time += 1
	time += k
	print(time)
	T -= 1


t = int(input())
for i in range(t):
	(x, y, k) = list(map(int, input().split()))
	res = (k * (y + 1) - 1) // (x - 1) + k
	rem = (k * (y + 1) - 1) % (x - 1)
	if rem == 0:
		print(res)
	else:
		print(res + 1)


from sys import stdin, stdout

def input():
	a = stdin.readline()
	if a[-1] == '\n':
		a = a[:-1]
	return a

def print(*argv, end='\n', sep=' '):
	n = len(argv)
	for i in range(n):
		if i == n - 1:
			stdout.write(str(argv[i]))
		else:
			stdout.write(str(argv[i]) + sep)
	stdout.write(end)
mod = 10 ** 9 + 7

def lcm(x, y):
	return x * y / gcd(x, y)

def fact(x, mod=mod):
	ans = 1
	for i in range(1, x + 1):
		ans = ans * i % mod
	return ans

def arr2D(n, m, default=0):
	lst = []
	for i in range(n):
		temp = [default] * m
		lst.append(temp)
	return lst

def sortDictV(x):
	return {k: v for (k, v) in sorted(x.items(), key=lambda item: item[1])}
from math import floor, ceil
from decimal import Decimal as d

def ceil_div(a, b):
	return floor(d(d(a + b - 1) / b))

def solve(x, y, k):
	x -= 1
	return floor(ceil_div(k * y + k - 1, x)) + k
for _ in range(int(input())):
	(x, y, k) = list(map(int, input().split()))
	print(solve(x, y, k))


for t in range(int(input())):
	(x, y, k) = map(int, input().split())
	ns = -(k * y + k - 1) // (x - 1)
	print(k - ns)


def ans(x, y, k):
	z = (k * y + k - 1) % (x - 1)
	if z == 0:
		t = (k * y + k - 1) // (x - 1) + k
	else:
		t = (k * y + k - 1) // (x - 1) + k + 1
	return t
m = int(input())
for i in range(m):
	a = input().split()
	x = int(a[0])
	y = int(a[1])
	k = int(a[2])
	print(ans(x, y, k))


tests = int(input())
for t in range(tests):
	(x, y, k) = list(map(int, input().split()))
	reach = y * k + k
	res = k
	num_stick = 1
	res += (reach - 1) // (x - 1)
	if (reach - 1) % (x - 1) != 0:
		res += 1
	print(res)


mod = 10 ** 9 + 7

def solve():
	(x, y, k) = map(int, input().split())
	ans = k
	t = k * y + k - 1
	ans += (t + x - 2) // (x - 1)
	print(ans)
t = int(input())
while t > 0:
	solve()
	t -= 1


from math import *
t = int(input())
for _ in range(t):
	(x, y, k) = map(int, input().split())
	y += 1
	x -= 1
	ans = (k * y - 1) // x
	if (k * y - 1) % x == 0:
		print(ans + k)
		continue
	print(ans + k + 1)


import math
t = int(input())
while t > 0:
	(x, y, k) = [int(x) for x in input().split()]
	sticks_needed = (y + 1) * k - 1
	print((sticks_needed + x - 2) // (x - 1) + k)
	t -= 1


for i in range(int(input())):
	(x, y, k) = [int(i) for i in input().split()]
	sticks_needed = y * k + k - 1 + x - 2
	sticks_exchanges = sticks_needed // (x - 1)
	print(sticks_exchanges + k)


import sys
t = int(input())
allInput = sys.stdin.readlines()
allOut = []
for inp in allInput:
	(x, y, k) = map(int, inp.split())
	p = k * (y + 1) - 1
	ans = p // (x - 1) + k
	if p % (x - 1) == 0:
		allOut.append(str(ans))
	else:
		allOut.append(str(ans + 1))
sys.stdout.write('\n'.join(allOut))


import sys
import heapq, functools, collections
import math, random
from collections import Counter, defaultdict

def solve(x, y, k):
	console('----- solving ------')
	sticks_needed = y * k + k - 1
	return k + -(-sticks_needed // (x - 1))

def console(*args):
	print('\x1b[36m', *args, '\x1b[0m', file=sys.stderr)
	return
inp = sys.stdin.readlines()
for case_num in range(int(inp[0])):
	(x, y, k) = list(map(int, inp[case_num + 1].split()))
	res = solve(x, y, k)
	print(res)


import sys
sys.setrecursionlimit(10000)
t = int(input())
for _ in range(t):
	(x, y, k) = list(map(int, input().split()))
	if (k + k * y - 1) % (x - 1) == 0:
		print((k + k * y - 1) // (x - 1) + k)
	else:
		print((k + k * y - 1) // (x - 1) + k + 1)


import sys

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

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

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

def list4d(a, b, c, d, e):
	return [[[[e for l in range(d)] for k 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
EPS = 10 ** (-10)
for _ in range(INT()):
	(x, y, k) = MAP()
	need = k + y * k - 1
	ans = ceil(need, x - 1) + k
	print(ans)


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
import copy
import time
starttime = time.time()
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
for _ in range(L()[0]):
	(x, y, k) = L()
	n = (k * y + k - x) // (x - 1) + 1 + ((k * y + k - x) % (x - 1) != 0)
	print(n + k)
endtime = time.time()


from sys import stdin
N = int(stdin.readline())
for case in range(N):
	(sticksforonestick, onecoal, torchneed) = map(int, stdin.readline().split())
	coal = 0
	transcations = 0
	sticks = 1
	transcations += torchneed
	sticks -= torchneed * onecoal
	left = torchneed - sticks
	transcations += (left + -left % (sticksforonestick - 1)) // (sticksforonestick - 1)
	print(transcations)


from math import ceil, floor
t = int(input())
for _ in range(t):
	(x, y, k) = map(int, input().split())
	(o, n, d) = (k, k + k * y - 1, x - 1)
	print(o + n // d + (1 if n % d else 0))


import math
t = int(input())
i = 0
while i < t:
	(x, y, k) = map(int, input().split())
	val = k
	total = k + y * k - 1
	p = total // (x - 1)
	if p * (x - 1) < total:
		p += 1
	print(val + p)
	i += 1


import math
t = int(input())
for _ in range(t):
	(x, y, k) = list(map(int, input().split()))
	s = k + k * y - 1
	x -= 1
	if s % x == 0:
		print(s // x + k)
	else:
		print(s // x + k + 1)


tests = int(input())
A = []
for i in range(tests):
	l = input()
	A.append(l.split())
	x = int(A[i][0])
	y = int(A[i][1])
	k = int(A[i][2])
	neob = k * (y + 1)
	t = (neob - 1) // (x - 1)
	if (neob - 1) % (x - 1) == 0:
		print(int(t) + k)
	else:
		print(int(t) + k + 1)


import math
for x in range(int(input())):
	(a, b, c) = list(map(int, input().split()))
	k = c * (a + b) - 1
	z = k // (a - 1)
	if k % (a - 1) == 0:
		print(z)
	else:
		print(z + 1)


import math
a = 0
for i in range(int(input())):
	(x, y, k) = map(int, input().split())
	a = abs(math.ceil((y + 1) * k - 3 + x) // (x - 1)) + k
	print(int(a))


n = int(input())
for i in range(n):
	b = input()
	(x, y, k) = b.split(' ')
	(x, y, k) = (int(x), int(y), int(k))
	a = (k * y + k - 1) // (x - 1)
	if a * (x - 1) + 1 < k + k * y:
		a += 1
	print(a + k)


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 + '\n')

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

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

def ceil(x, y=1):
	return int(-(-x // y))
import math
from collections import defaultdict
for _ in range(ri()):
	(x, y, k) = ria()
	st = k + y * k - 1
	cnt = ceil(st, x - 1) + k
	print(cnt)


from sys import stdin, stdout, setrecursionlimit
from collections import defaultdict as dd
from math import ceil
input = stdin.readline
for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	z = y * k
	r = ceil((z - 1) / (x - 1))
	b = 1 + r * (x - 1)
	if b == z:
		r += 1
	b = 1 + r * (x - 1)
	if b - z >= k:
		stdout.write(str(r + k) + '\n')
	else:
		e = ceil((k - (b - z)) / (x - 1))
		stdout.write(str(r + k + e) + '\n')


import math
for _ in range(int(input())):
	(x, y, n) = map(int, input().split())
	req = y * n + n
	count = 0
	count += (req - 1) // (x - 1)
	if (req - 1) % (x - 1) == 0:
		print(count + n)
	else:
		print(count + n + 1)


from __future__ import division, print_function
import os
import sys
from io import BytesIO, IOBase

def main():

	def ceilDiv(a, b):
		return (a + b - 1) // b
	for _ in range(int(input())):
		(x, y, k) = map(int, input().split())
		n = ceilDiv(k + k * y - 1, x - 1)
		print(n + k)
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip
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))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


test = int(input())
for _ in range(test):
	(x, y, k) = map(int, input().split())
	v = k - 1 + k * y
	if v % (x - 1) == 0:
		print(v // (x - 1) + k)
	else:
		print(v // (x - 1) + 1 + k)


t = int(input())
from math import ceil, floor
for _ in range(t):
	(x, y, k) = list(map(int, input().split()))
	print(k - (1 - y * k - k) // (x - 1))


for _ in range(int(input())):
	(a, b, c) = map(int, input().split())
	print((c + b * c + a - 3) // (a - 1) + c)


from math import *
t = int(input())
for i in range(t):
	(x, y, t) = map(int, input().split())
	required = t * y + t
	p = x
	if (required - p) % (x - 1) != 0:
		ans = t + 2
		a = ceil((required - p) // (x - 1))
	else:
		ans = t + 1
		a = (required - p) // (x - 1)
	print(ans + a)


from math import ceil, floor
t = int(input())
while t:
	(x, y, k) = map(int, input().split())
	u = k * (y + 1) - 1
	if u % (x - 1):
		print(k + u // (x - 1) + 1)
	else:
		print(k + u // (x - 1))
	t -= 1


import sys
from sys import stdin, stdout
import math
import random
import heapq
from collections import Counter
from functools import lru_cache
try:
	for _ in range(int(input())):
		(x, y, k) = map(int, input().split())
		sticks = y * k + k - 1 + x - 2
		print(sticks // (x - 1) + k)
except EOFError as e:
	print(e)


import sys
input = lambda : sys.stdin.readline().rstrip()
t = int(input())
for _ in range(t):
	(x, y, k) = map(int, input().split())
	print((k * y + k + x - 3) // (x - 1) + k)


for i in range(int(input())):
	(x, y, k) = map(int, input().split())
	need = y * k + k - 1
	ans = (need + x - 1 - 1) // (x - 1) + k
	print(ans)


import sys
input = iter(sys.stdin.read().splitlines()).__next__
sys.setrecursionlimit(10000)
TC = int(input())
for tc in range(TC):
	(x, y, k) = map(int, input().split())
	needed_sticks = k + k * y
	res = (needed_sticks - 1 + (x - 1 - 1)) // (x - 1) + k
	print(res)


import time
t = int(input())
time.sleep(0.5)

def check(x, y, k, m):
	sticks = m * x - (m - 1)
	if k * y > sticks:
		return False
	sticks -= k * y
	if sticks >= k:
		return True
	return False
for i in range(t):
	(x, y, k) = map(int, input().split())
	l = 1
	r = int(1e+19)
	ans = -1
	while l <= r:
		mid = (l + r) // 2
		if check(x, y, k, mid):
			ans = mid + k
			r = mid - 1
		else:
			l = mid + 1
	print(ans)


t = int(input())
a = [list(map(int, input().split())) for i in range(t)]
ans = []
for i in range(t):
	v = a[i][1] * a[i][2] + a[i][2]
	x = -((v - 1) // -(a[i][0] - 1))
	ans.append(x + a[i][2])
for i in range(t):
	print(ans[i])


import sys
input = sys.stdin.readline

def solve():
	(x, y, k) = map(int, input().split())
	num = k * y + k - 1
	den = x - 1
	print((k * y + k - 1 + x - 2) // (x - 1) + k)
for _ in range(int(input())):
	solve()


import sys
import math as m

def main():
	pass

def binary(n):
	return bin(n).replace('0b', ' ')

def decimal(s):
	return int(s, 2)

def pow2(n):
	p = 0
	while n > 1:
		n //= 2
		p += 1
	return p

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

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

def iinp():
	return int(input())

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

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

def p(a):
	print(a)
for _ in range(iinp()):
	(x, y, k) = ninp()
	cnt1 = k
	sticks = y * k
	cnt2 = m.ceil((sticks - 1) / (x - 1))
	sticksrem = cnt2 * (x - 1) + 1 - sticks
	if sticksrem > k:
		print(cnt1 + cnt2)
	else:
		cnt3 = m.ceil((k - sticksrem) / (x - 1))
		print(cnt1 + cnt2 + cnt3)


def res(l):
	result = l[2] + 1
	z = l[2] * l[1] + l[2] - l[0]
	if z % (l[0] - 1) != 0:
		result = result + int(z // (l[0] - 1)) + 1
	else:
		result = z // (l[0] - 1) + result
	print(result)
t = int(input())
while t > 0:
	t = t - 1
	l = list(map(int, input().split(' ')))
	res(l)


t = int(input())
for t in range(t):
	(x, y, k) = map(int, input().split())
	q = k * y + k
	if x == 2:
		print(q // (x - 1) - 1 + k)
	else:
		j = q // (x - 1)
		if j * (x - 1) == q or j * (x - 1) + 1 == q:
			j -= 1
		print(j + k + 1)


t = int(input())
for _ in range(t):
	(x, y, k) = map(int, input().split())
	x = x - 1
	need_sticks = y * k + k - 1
	need_trades = (need_sticks + x - 1) // x + k
	print(need_trades)


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	(x, y, z) = list(map(int, input().split()))
	r = z * (y + 1)
	x -= 1
	ans = (r - 1) // x
	if (r - 1) % x > 0:
		ans += 1
	print(ans + z)


tests = int(input())
for test in range(tests):
	a = 1
	(x, y, k) = map(int, input().split())
	a1 = (k * (y + 1) - 1 + x - 2) // (x - 1)
	print(a1 + k)


for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	step = k + y * k
	ans = 0
	while step >= x:
		ans += step // x
		step = step // x + step % x
	if ans * x - ans + 1 < k + k * y:
		ans += 1
	print(ans + k)


T = int(input())
r = 1
while r <= T:
	(x, y, k) = map(int, input().split())
	ans = k
	minx = y * k + k
	ans += (minx - 1) // (x - 1)
	if (minx - 1) % (x - 1) > 0:
		ans += 1
	print(ans)
	r += 1


import math
import sys
input = sys.stdin.readline
t = int(input())
for i in range(t):
	(x, y, k) = [int(x) for x in input().split()]
	low = 0
	high = 10000000000000000000
	while low < high:
		mid = (low + high) // 2
		if mid - y * k < k:
			low = mid + 1
		else:
			high = mid
	ans = (low - 1) // (x - 1) + k
	if (low - 1) % (x - 1):
		ans += 1
	print(ans)


q = int(input())
while q:
	q -= 1
	(x, y, k) = [int(x) for x in input().split()]
	target = y * k + k
	(l, r) = (0, 2 * 10 ** 19)

	def f(i):
		return (x - 1) * i + 1
	while r - l > 1:
		m = r + l >> 1
		if f(m) >= target:
			r = m
		else:
			l = m
	print(r + k)


from math import ceil
for i in range(int(input())):
	(x, y, k) = map(int, input().split())
	need = k * y + k - 1
	ans = need // (x - 1) + (need % (x - 1) != 0) + k
	print(ans)


import sys
import bisect as bi
import math
from collections import defaultdict as dd
import heapq
import itertools
input = sys.stdin.readline
import random
mo = 10 ** 9 + 7

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

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

def sin():
	return input()

def inin():
	return int(input())

def power(x, y):
	if y == 0:
		return 1
	temp = power(x, int(y / 2)) % mo
	if y % 2 == 0:
		return temp * temp % mo
	elif y > 0:
		return x * temp * temp % mo
	else:
		return temp * temp // x % mo
for _ in range(inin()):
	(x, y, k) = cin()
	ans = (k * y + k - 1 + x - 2) // (x - 1)
	print(ans + k)


tc = int(input())
for _ in range(tc):
	[x, y, t] = list(map(int, input().split()))
	st = y * t + t
	if (st - 1) % (x - 1) == 0:
		print((st - 1) // (x - 1) + t)
	else:
		print((st - 1) // (x - 1) + t + 1)


t = int(input())
for i in range(t):
	(x, y, k) = [int(i) for i in input().split()]
	x -= 1
	m = 0
	m += k
	tts = y * k + k - 1
	m += tts // x
	if tts % x != 0:
		m += 1
	print(m)


t = int(input())
from math import ceil, floor
for i in range(t):
	(x, y, k) = map(int, input().split())
	tot = y * k + k
	m = (tot - x - 1) // (x - 1)
	print(m + k + 2)


import sys
input = sys.stdin.readline
cases = int(input())
for case in range(cases):
	(x, y, k) = map(int, input().split())
	n = (k * (y + 1) + x - 3) // (x - 1)
	if n * (x - 1) + 1 < k * (y + 1):
		n += 1
	print(n + k)


import math
for _ in range(int(input())):
	(s, c, n) = map(int, input().split())
	print((n * c + n - 1 + s - 2) // (s - 1) + n)


import math
from collections import defaultdict
import functools as f
from itertools import permutations as p
t = 1
t = int(input())
for _ in range(t):
	(x, y, k) = list(map(int, input().split()))
	an = 1
	val = k + k * y
	mov = (val - x) // (x - 1)
	while True:
		if mov * (x - 1) + x - k * y >= k:
			break
		mov += 1
	mov += 1
	mov += k
	print(mov)


t = int(input())
xs = []
ys = []
ks = []
for i in range(t):
	(x, y, z) = map(int, input().split())
	xs.append(x)
	ys.append(y)
	ks.append(z)
for j in range(t):
	x = xs[j]
	y = ys[j]
	k = ks[j]
	num_sticks_needed = y * k + k
	num_trades_needed = 0
	if (num_sticks_needed - 1) % (x - 1) == 0:
		num_trades_needed += (num_sticks_needed - 1) // (x - 1)
	else:
		num_trades_needed += (num_sticks_needed - 1) // (x - 1) + 1
	num_trades_needed += k
	print(num_trades_needed)


def solve():
	(x, y, k) = map(int, input().split())
	ans = k + (k * y + k - 1 + x - 2) // (x - 1)
	print(ans)
	return

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


for _ in range(int(input())):
	(x, y, k) = [int(s) for s in input().split()]
	n = ((y + 1) * k - 1 + (x - 2)) // (x - 1)
	print(n + k)


def ceil_div(dividend, divisor):
	return (dividend + divisor - 1) // divisor
t = int(input())
for _ in range(t):
	(x, y, k) = map(int, input().split())
	coal_trades = k
	sticks_for_coal = coal_trades * y
	sticks_needed = k - 1 + sticks_for_coal
	sticks_trades = ceil_div(sticks_needed, x - 1)
	print(coal_trades + sticks_trades)


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')

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

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

def solve():
	for _ in range(ii()):
		(x, y, k) = mi()
		x1 = k * y + k - 1
		print(ceil(x1, x - 1) + k)
if path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
else:
	input = sys.stdin.readline
solve()


from collections import deque
from collections import OrderedDict
import math
import sys
import os
import threading
import bisect
import operator
import heapq
from atexit import register
from io import BytesIO
import io
from sys import stdin, stdout
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')
input = lambda : sys.stdin.readline().rstrip('\r\n')
for t in range(int(input())):
	(x, y, k) = map(int, input().split())
	sumA = (k * y + k - 1) // (x - 1)
	if (k * y + k - 1) % (x - 1) != 0:
		sumA += 1
	sumA += k
	print(sumA)
sys.exit(0)
n = int(input())
lis = list(map(int, input().split()))
answer = 0
for i in range(n):
	answer += lis[i] - 1
if n == 1:
	print(n - 1)
elif n > 32:
	print(answer)
	sys.exit(0)
lis.sort()
for i in range(2, 50000):
	localMin = 0
	for j in range(n):
		needVal = i ** j
		localMin += abs(lis[j] - needVal)
		if localMin > answer:
			break
	else:
		answer = min(localMin, answer)
print(answer)
sys.exit(0)

class Person:

	def __init__(self, name, age):
		self.name = name
		self.age = age
p1 = Person('heelo', 27)
print(help(Person))
age = 26
name = 'Swaroop'
print('Возрас {} -- {} лет'.format(name, age))
print(help(object))


import decimal
t = int(input())
import math
while t > 0:
	(x, y, k) = map(int, input().split(' '))
	res = k
	a = y * k + (k - 1)
	d = a // (x - 1)
	res += d
	if a % (x - 1) == 0:
		print(res)
	else:
		res += 1
		print(res)
	t -= 1


from math import ceil

def find_ans(x, y, k):
	n = ceil((k * y + k - 1) / (x - 1))
	while n * x - (n - 1) < k * y + k:
		n += 1
	while (n - 1) * x - (n - 2) >= k * y + k:
		n -= 1
	print(n + k)
for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	find_ans(x, y, k)


import math
import fractions

def solution(x, y, k):
	e1 = math.ceil(fractions.Fraction(k + k * y - 1, x - 1))
	e2 = k
	return e1 + e2
t = int(input())
for _ in range(t):
	(x, y, k) = map(int, input().split(' '))
	print(solution(x, y, k))


from sys import stdin
import math
ip = stdin.readline
for _ in range(int(ip())):
	(x, y, k) = map(int, ip().split())
	(m, r) = divmod(k * (y + 1) - 1, x - 1)
	if r:
		m += 1
	print(m + k)


t = int(input())
r = list()
for i in range(t):
	a = input().split(' ')
	x = int(a[0])
	y = int(a[1])
	k = int(a[2])
	n = (k - 1 + k * y) // (x - 1)
	if (k * y + k - 1) % (x - 1) != 0:
		n += 1
	r.append(n + k)
for i in r:
	print(int(i))


import math
for _ in range(int(input())):
	(x, y, k) = [int(c) for c in input().split()]
	ans = k * (y + 1) // (x - 1)
	ans -= 2
	totalcount = ans * (x - 1) + 1
	while totalcount - k * y - k < 0:
		totalcount += x - 1
		ans += 1
	print(ans + k)


t = int(input())
i = 0
while i < t:
	(x, y, z) = input().split()
	x = int(x)
	y = int(y)
	z = int(z)
	w = y * z + (z - x)
	f = x
	if w % (x - 1) != 0:
		v = w // (x - 1) + 1
	else:
		v = w // (x - 1)
	print(v + z + 1)
	i += 1


from math import floor, ceil
for i in range(int(input())):
	(x, y, k) = map(int, input().split())
	ans = k
	stick = k * y + k - x
	if stick % (x - 1) == 0:
		ans += stick // (x - 1)
	else:
		ans += 1 + stick // (x - 1)
	print(ans + 1)


import sys
from math import ceil
for l in sys.stdin.read().strip().splitlines()[1:]:
	(x, y, k) = list(map(int, l.split()))
	a = k * y + k - 1
	b = x - 1
	print((a + b - 1) // b + k)


import math
t = int(input())
for _ in range(t):
	(x, y, k) = list(map(int, input().split()))
	a = k * y
	b = x - 1
	ans = math.ceil(a / b)
	temp = 1 + ans * b - a
	ans += math.ceil((k - temp) / b)
	print(ans + k)


input = __import__('sys').stdin.readline
for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	print((y * k + k - 1 + x - 2) // (x - 1) + k)


import math

def shrey():
	(x, y, k) = map(int, input().split())
	s = k + y * k
	ans = s // (x - 1)
	ans = (s - 1) // (x - 1)
	if (s - 1) % (x - 1) != 0:
		ans += 1
	print(ans + k)
T = input()
T = int(T)
for q in range(1, T + 1):
	shrey()


n = int(input())
d = []
x = []
p = -3
for i in range(1, n + 1):
	(a, b, c) = map(int, input().split())
	d.append(a)
	d.append(b)
	d.append(c)
for j in range(1, n + 1):
	p = p + 3
	q = d[p]
	w = d[p + 1]
	e = d[p + 2]
	if q - 1 == 1:
		u = e * w + e
		x.append(u - 1 + e)
		continue
	else:
		h = w * e + e
		if h % (q - 1) == 0 or h % (q - 1) == 1:
			s = h // (q - 1)
			x.append(s + e)
		else:
			s = h // (q - 1) + 1
			x.append(s + e)
for k in x:
	print(k)


import math
getn = lambda : int(input())
getlist = lambda : list(map(int, input().split(' ')))

def cdiv(a, b):
	ret = a // b + int(a % b != 0)
	return ret

def solve():
	(x, y, k) = getlist()
	if k * (y + 1) > x:
		return cdiv(k * (y + 1) - 1, x - 1) + k
	else:
		return k + 1
t = getn()
while t > 0:
	print(solve())
	t -= 1


from sys import *
from math import *
t = int(stdin.readline())
for _ in range(t):
	(x, y, k) = map(int, stdin.readline().split())
	s = k + y * k - 1
	ans = s // (x - 1)
	if s % (x - 1) != 0:
		ans += 1
	print(ans + k)


t = int(input())
for i in range(t):
	ip = list(map(int, input().split()))
	x = ip[0]
	y = ip[1]
	k = ip[2]
	needed = k * (y + 1) - 1
	if needed == 1:
		print(2)
		continue
	iter = needed // (x - 1)
	if needed % (x - 1) != 0:
		iter += 1
	print(iter + k)


for _ in range(int(input())):
	(x, y, k) = list(map(int, input().split()))
	tot = k + k * y
	lo = 0
	hi = 1000000001999999999 + 1
	ans = hi
	while lo <= hi:
		mid = lo + hi >> 1
		req = 1 + (x - 1) * mid
		if req >= tot:
			ans = min(ans, mid)
			hi = mid - 1
		else:
			lo = mid + 1
	print(ans + k)


q = int(input())
while q > 0:
	(x, y, k) = map(int, input().split())
	need = y * k + k
	i = 0
	f = 10000000000000000000
	while i < f:
		m = (i + f) // 2
		mm = m - 1
		if m * x - mm >= need:
			f = m
		else:
			i = m + 1
	print(int(i + k))
	q = q - 1


n = int(input())
for _ in range(n):
	(x, y, k) = map(int, input().split())
	sticks_for_torches = k * y + k
	number_of_stick_changes = (sticks_for_torches - 1) // (x - 1) + ((sticks_for_torches - 1) % (x - 1) > 0)
	number_of_coal_changes = k
	print(number_of_coal_changes + number_of_stick_changes)


from math import *
from bisect import *
from collections import Counter, defaultdict
from sys import stdin, stdout
input = stdin.readline
I = lambda : int(input())
M = lambda : map(int, input().split())
LI = lambda : list(map(int, input().split()))
for _ in range(I()):
	(n, m, k) = M()
	x = m * k + k
	if x % (n - 1) != 1 and x % (n - 1) != 0:
		x //= n - 1
		x += 1
	else:
		x //= n - 1
	x += k
	if n - 1 == 1:
		print(x - 1)
	else:
		print(x)


t = int(input())
while t > 0:
	(x, y, k) = map(int, input().split())
	sticks = k - 1 + k * y
	if sticks % (x - 1) == 0:
		steps = sticks // (x - 1)
	else:
		steps = sticks // (x - 1) + 1
	steps += k
	t -= 1
	print(steps)


for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	sticksreq = y * k + k - 1
	onetrade = x - 1
	if sticksreq % onetrade:
		ans = sticksreq // onetrade + k + 1
	else:
		ans = sticksreq // onetrade + k
	print(ans)


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):
	(x, y, k) = input_split()
	num = k * (y + 1) - 1
	denom = x - 1
	if num % denom == 0:
		ans = num // denom
	else:
		ans = num // denom + 1
	ans += k
	answers.append(ans)
print(*answers, sep='\n')


import os
import heapq
import sys, threading
import math as mt
import operator
from copy import copy
from collections import defaultdict, deque
from io import BytesIO, IOBase
sys.setrecursionlimit(2 * 10 ** 5)

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

def inpt():
	return [int(k) for k in input().split()]

def main():
	for _ in range(int(input())):
		(x, y, k) = inpt()
		d = k - x
		d += k * y
		ans = d // (x - 1)
		if d % (x - 1) > 0:
			ans += 1
		ans += k
		print(ans + 1)
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())):
	(x, y, k) = [int(t) for t in input().split()]
	ans = (k + k * y - 1) // (x - 1)
	if (k + k * y - 1) % (x - 1) > 0:
		ans += 1
	print(ans + k)


from collections import Counter
from collections import deque
from sys import stdin
from bisect import *
from heapq import *
import math
g = lambda : stdin.readline().strip()
gl = lambda : g().split()
gil = lambda : [int(var) for var in gl()]
gfl = lambda : [float(var) for var in gl()]
gcl = lambda : list(g())
gbs = lambda : [int(var) for var in g()]
mod = int(1000000000.0) + 7
inf = float('inf')
(t,) = gil()
for _ in range(t):
	(x, y, k) = gil()
	total = k * (y + 1) - 1
	ans = total // (x - 1)
	if total % (x - 1):
		ans += 1
	print(ans + k)


import sys
from collections import defaultdict, Counter as CC
from math import sqrt, ceil, floor, log2
INF = float('inf')
MOD = 10 ** 9 + 7
read = lambda : [int(s) for s in sys.stdin.readline().split()]

def solve():
	(x, y, k) = read()
	total = k + y * k - 1
	res = total // (x - 1)
	if total % (x - 1):
		res += 1
	print(res + k)
_ = 1
_ = int(input())
while _:
	solve()
	_ -= 1


import math
T = int(input())
for _ in range(T):
	(x, y, k) = map(int, input().split())
	totalSticks = k + k * y
	opsForSticks = (totalSticks - 2) // (x - 1)
	opsForCoal = k
	totalMinOps = math.ceil(opsForCoal + opsForSticks + 1)
	print(totalMinOps)


import math
t = int(input())
for i in range(t):
	totalInp = list(map(int, input().split()))
	co = 0
	totalStickOps = 1 + math.ceil((totalInp[1] * totalInp[2] - 1 + (totalInp[2] - 1)) // (totalInp[0] - 1))
	print(totalStickOps + totalInp[2])


t = int(input())
while t > 0:
	(x, y, k) = map(int, input().split())
	y_sticks = k * y
	total = k + y_sticks
	if (total - 1) % (x - 1) != 0:
		s_trades = (total - 1) // (x - 1) + 1
	else:
		s_trades = (total - 1) // (x - 1)
	trades = k + s_trades
	print(trades)
	t -= 1


from math import ceil

def solve(x, y, k):
	sticks_needed = k - 1
	cnt = k
	sticks_needed += y * k
	cnt += sticks_needed // (x - 1) + (sticks_needed % (x - 1) > 0)
	return cnt
t = int(input())
for _ in range(t):
	(x, y, k) = map(int, input().split())
	print(solve(x, y, k))


from math import floor
t = int(input())
for _ in range(t):
	(x, y, k) = map(int, input().split())
	if (k * (y + 1) - 1) % (x - 1) == 0:
		print(k + (k * (y + 1) - 1) // (x - 1))
	else:
		print(k + (k * (y + 1) - 1) // (x - 1) + 1)


R = lambda : list(map(int, input().split()))
t = R()
for i in range(0, t[0]):
	(x, y, k) = R()
	p = k * y + k - 1
	q = x - 1
	print((k + k * y + x - 3) // (x - 1) + k)


import math
for j in range(int(input())):
	(a, b, c) = map(int, input().split())
	s = b * c + c
	s -= 1
	r = (s + a - 2) // (a - 1)
	r = r + c
	print(r)


import math

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

def ans(x, y, k):
	p = k + k * y
	return ceil(p - 1, x - 1) + k
T = int(input())
for t in range(T):
	(x, y, k) = input().split()
	x = int(x)
	y = int(y)
	k = int(k)
	print(ans(x, y, k))


import math
a = int(input())
for i in range(a):
	(x, y, k) = map(int, input().split())
	p = 1
	if (k + y * k - 1) % (x - 1) == 0:
		p = 0
	print((k + y * k - 1) // (x - 1) + p + k)


n = int(input())
for n in range(n):
	(x, y, k) = [int(x) for x in input().split()]
	sticks_needed = k * (y + 1)
	print((sticks_needed - 1) // (x - 1) + (1 if (sticks_needed - 1) % (x - 1) != 0 else 0) + k)


n = int(input())
for i in range(n):
	a = list(map(int, input().split()))
	b = a[2] * (a[1] + 1) - 1
	if b % (a[0] - 1) == 0:
		b = b // (a[0] - 1)
	else:
		b = b // (a[0] - 1) + 1
	print(b + a[2])


from __future__ import division, print_function
from sys import stdin, stdout
import bisect
import math
import heapq
i_m = 9223372036854775807

def inin():
	return int(input())

def stin():
	return input()

def spin():
	return map(int, stin().split())

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

def matrix(n):
	return [list(map(int, input().split())) for i in range(n)]

def string2intlist(s):
	return list(map(int, s))

def calculate_sum(a, N):
	m = N / a
	sum = m * (m + 1) / 2
	ans = a * sum
	return ans

def series(N):
	return N * (N + 1) // 2

def count2Dmatrix(i, list):
	return sum((c.count(i) for c in list))

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

def GCD(x, y):
	x = abs(x)
	y = abs(y)
	if min(x, y) == 0:
		return max(x, y)
	while y:
		(x, y) = (y, x % y)
	return x

def LCM(x, y):
	return x * y // GCD(x, y)

def Divisors(n):
	l = []
	for i in range(1, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n // i == i:
				l.append(i)
			else:
				l.append(i)
				l.append(n // i)
	return l

def isprime(n):
	for i in range(2, int(math.sqrt(n)) + 1):
		if n % i == 0:
			return False
	return True
prime = []

def SieveOfEratosthenes(n):
	global prime
	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
	f = []
	for p in range(2, n):
		if prime[p]:
			f.append(p)
	return f
q = []

def dfs(n, d, v, c):
	global q
	v[n] = 1
	x = d[n]
	q.append(n)
	j = c
	for i in x:
		if i not in v:
			f = dfs(i, d, v, c + 1)
			j = max(j, f)
	return j

def knapSack(W, wt, val, n):
	K = [[0 for x in range(W + 1)] for x in range(n + 1)]
	for i in range(n + 1):
		for w in range(W + 1):
			if i == 0 or w == 0:
				K[i][w] = 0
			elif wt[i - 1] <= w:
				K[i][w] = max(val[i - 1] + K[i - 1][w - wt[i - 1]], K[i - 1][w])
			else:
				K[i][w] = K[i - 1][w]
	return K[n][W]
for _ in range(inin()):
	(x, y, k) = spin()
	need = y * k + k
	print((need - 1 + x - 2) // (x - 1) + k)


def get_answer(enter):
	(a, b, k) = map(int, enter.split())
	return k + ((b + 1) * k - 1) // (a - 1) + bool(((b + 1) * k - 1) % (a - 1))
times = int(input())
for i in range(times):
	enter = input()
	print(get_answer(enter))


from __future__ import division, print_function
import os, sys
from io import BytesIO, IOBase
import threading, sys
from threading import Thread, main_thread

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

def si():
	return input()

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

def msi():
	return map(str, input().strip().split(' '))

def li():
	return list(mi())

def dmain():
	sys.setrecursionlimit(100000000)
	threading.stack_size(10240000)
	thread = threading.Thread(target=main)
	thread.start()
abc = 'abcdefghijklmnopqrstuvwxyz'
abd = {'a': 0, 'b': 1, 'c': 2, 'd': 3, 'e': 4, 'f': 5, 'g': 6, 'h': 7, 'i': 8, 'j': 9, 'k': 10, 'l': 11, 'm': 12, 'n': 13, 'o': 14, 'p': 15, 'q': 16, 'r': 17, 's': 18, 't': 19, 'u': 20, 'v': 21, 'w': 22, 'x': 23, 'y': 24, 'z': 25}
mod = 1000000007
inf = float('inf')
vow = ['a', 'e', 'i', 'o', 'u']
(dx, dy) = ([-1, 1, 0, 0], [0, 0, 1, -1])

def getKey(item):
	return item[0]

def sort2(l):
	return sorted(l, key=getKey)

def d2(n, m, num):
	return [[num for x in range(m)] for y in range(n)]

def isPowerOfTwo(x):
	return x and (not x & x - 1)

def decimalToBinary(n):
	return bin(n).replace('0b', '')

def ntl(n):
	return [int(i) for i in str(n)]

def ncr(n, r):
	return factorial(n) // (factorial(r) * factorial(n - r))

def ceil(x, y):
	if x % y == 0:
		return x // y
	else:
		return x // y + 1

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

def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

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 main():
	for _ in range(ii()):
		(x, y, k) = mi()
		ans = 0
		p = k * y + k - 1
		st = 1
		low = 0
		high = 10 ** 19
		while low <= high:
			mid = (low + high) // 2
			cur = -mid + x * mid
			if cur >= p:
				ans = mid + k
				high = mid - 1
			else:
				low = mid + 1
		print(ans)
main()


for t in range(int(input())):
	(x, y, k) = [int(i) for i in input().split()]
	sticks_to_get = k * (y + 1) - 1
	(num_trades_for_sticks, left) = divmod(sticks_to_get, x - 1)
	if left > 0:
		num_trades_for_sticks += 1
	num_trades_for_coals = k
	print(num_trades_for_sticks + num_trades_for_coals)


T = int(input())
for t in range(T):
	(x, y, k) = [int(i) for i in input().split()]
	print(((y + 1) * k + x - 3) // (x - 1) + k)


from sys import stdin, stdout, setrecursionlimit
import heapq
from math import gcd, ceil, sqrt
from collections import Counter, deque
from bisect import bisect_left, bisect_right
from itertools import combinations, permutations
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()
setrecursionlimit(100000)
mod = 1000000007
tc = ii1()
for _ in range(tc):
	(x, y, k) = iia()
	(a, b) = (k + k * y - 1, x - 1)
	print((a + b - 1) // b + k)


t = int(input())
for _ in range(t):
	(x, y, k) = map(int, input().split())
	n = y * k + k - 1
	s = (n + (x - 1) - 1) // (x - 1)
	print(s + k)


import sys
for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	n = k * y + k
	print(k - (1 - n) // (x - 1))


n = int(input())
for j in range(0, n):
	(x, y, z) = input().split()
	x = int(x)
	y = int(y)
	z = int(z)
	a = z * y + z - 1
	b = x - 1
	ans = (a + b - 1) // b
	ans = ans + z
	print(ans)


t = input()
t = int(t)
for _ in range(t):
	(x, y, k) = map(int, input().split())
	l = 0
	r = 2000000000000000000
	while r - l > 1:
		z = (r + l) // 2
		if z * x - (z - 1) < y * k + k:
			l = z
		else:
			r = z
	print(r + k)


from math import *
sInt = lambda : int(input())
mInt = lambda : map(int, input().split())
lInt = lambda : list(map(int, input().split()))
t = sInt()
for _ in range(t):
	(x, y, k) = mInt()
	ans = (y * k + k - 1) // (x - 1) + k
	if (y * k + k - 1) % (x - 1):
		ans += 1
	print(ans)


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 types import GeneratorType

def iterative(f, stack=[]):

	def wrapped_func(*args, **kwargs):
		if stack:
			return f(*args, **kwargs)
		to = f(*args, **kwargs)
		while True:
			if type(to) is GeneratorType:
				stack.append(to)
				to = next(to)
				continue
			stack.pop()
			if not stack:
				break
			to = stack[-1].send(to)
		return to
	return wrapped_func
import math
for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	l = 0
	r = 10 ** 25
	while l <= r:
		mid = (l + r) // 2
		val = mid * x + 1 - mid
		if val >= k + k * y:
			ans = mid + k
			r = mid - 1
		else:
			l = mid + 1
	print(ans)


import math

def solve(x, y, k):
	needed = k * y + k
	trades = (needed - 1) // (x - 1)
	if (needed - 1) % (x - 1):
		trades += 1
	return trades + k
for case1 in range(int(input())):
	(x, y, k) = map(int, input().split())
	ans1 = solve(x, y, k)
	print(ans1)


import sys
import math
ii = lambda : int(sys.stdin.buffer.readline().rstrip())
il = lambda : list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda : list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]
iss = lambda : sys.stdin.buffer.readline().decode().rstrip()
sl = lambda : list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]
t = ii()
for case in range(t):
	(x, y, k) = il()
	ans = k + (k * (1 + y) - 1 + x - 2) // (x - 1)
	print(ans)


import math
for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	number_of_sticks = k + k * y
	n = (number_of_sticks - 1) // (x - 1)
	if 1 + n * (x - 1) < number_of_sticks:
		ans = n + 1 + k
	else:
		ans = n + k
	print(ans)


t = int(input())
while t:
	t -= 1
	(x, y, k) = map(int, input().split())
	st = k * (1 + y) - 1
	tr = st // (x - 1)
	if st % (x - 1) != 0:
		tr += 1
	print(tr + k)


import math
from collections import deque
from sys import stdin, stdout
from string import ascii_letters
import sys
letters = ascii_letters
input = stdin.readline
for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	need = k * y + k - 1
	print(need // (x - 1) + (1 if need % (x - 1) else 0) + k)


import sys, threading, math

def main():
	for _ in range(int(input())):
		(x, y, k) = map(int, input().split())
		w = math.ceil((k * y - 1) / (x - 1))
		if math.ceil((k * y - 1) / (x - 1)) == math.floor((k * y - 1) / (x - 1)):
			w += 1
		print(w + math.ceil((k - (1 + w * (x - 1) - y * k)) / (x - 1)) + k)
max_recur_size = 10 ** 5 * 2 + 1000
max_stack_size = max_recur_size * 500
sys.setrecursionlimit(max_recur_size)
threading.stack_size(max_stack_size)
thread = threading.Thread(target=main)
thread.start()


import math
t = int(input())
for _ in range(t):
	(x, y, k) = map(int, input().split())
	mul = x - 1
	ans = k
	needstick = k * (y + 1)
	trade = (needstick - 1) // mul + 1
	if (needstick - 1) % mul == 0:
		ans -= 1
	ans += trade
	print(ans)


import sys, os, io
input = sys.stdin.readline
T = int(input())
ans = [0] * T
for t in range(T):
	(x, y, k) = map(int, input().split())
	ans[t] = k - -((y + 1) * k - 1) // (x - 1)
print(*ans, sep='\n')


def ans(arr):
	(x, y, k) = (arr[0], arr[1], arr[2])
	cnt = k * (y + 1) - x - 1
	cnt = cnt // (x - 1)
	cnt += 1
	cnt += k
	return cnt + 1
t = int(input())
for _ in range(t):
	xyk = list(map(int, input().strip().split()))
	print(ans(xyk))


for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	sticks = (y + 1) * k
	count = k
	s = x
	count += 1
	sticks -= x
	count += sticks // (x - 1)
	if sticks % (x - 1) != 0:
		count += 1
	print(count)


t = int(input())
while t > 0:
	t -= 1
	(x, y, k) = map(int, input().split())
	s = k * y + k
	b = s - 1
	if b % (x - 1) == 0:
		print(b // (x - 1) + k)
	else:
		print(b // (x - 1) + k + 1)


from math import ceil
t = int(input())

def div_ceil(a, b):
	return (a + b - 1) // b
for i in range(t):
	(x, y, k) = map(int, input().split())
	ans = div_ceil(k * y + k - 1, x - 1)
	print(ans + k)


def answer(x, y, k):
	t = k * y + k - 1
	p = t // (x - 1)
	if t % (x - 1) != 0:
		p += 1
	return p + k
t = int(input())
for i in range(t):
	(x, y, k) = map(int, input().split())
	print(answer(x, y, k))


for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	i = k * (y + 1) - 1
	j = 0
	if i % (x - 1) == 0:
		j = 0
	else:
		j = 1
	print(i // (x - 1) + j + k)


for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	req = z + z * y - x
	trade = req // (x - 1)
	if req % (x - 1) != 0:
		trade = trade + 1
	trade = trade + 1
	print(trade + z)


from collections import defaultdict
import math

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

def ML():
	return list(MI())

def I():
	return int(input())

def LOOP(SizE, solve):
	for XIX in range(SizE):
		solve()

def solve():
	(x, y, k) = MI()
	f = k * y + (k - 1)
	x -= 1
	c = f // x
	if f % x != 0:
		c += 1
	print(c + k)
LOOP(I(), solve)


for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	sticksreq = y * k + k
	ans = (sticksreq - 1) // (x - 1)
	if (sticksreq - 1) % (x - 1) != 0:
		ans += 1
	print(ans + k)


t = int(input())
for _ in range(t):
	(x, y, k) = map(int, input().split())
	steps = k
	tot = k * (y + 1)
	steps = (tot - 1) // (x - 1)
	(q, rem) = divmod(tot - 1, x - 1)
	steps = q
	if rem:
		steps += 1
	print(steps + k)


from math import *
from bisect import *
from collections import *
from random import *
from decimal import *
import sys
from itertools import product
input = sys.stdin.readline

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

def st():
	return input().rstrip('\n')

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

def ma():
	return map(int, input().split())
t = inp()
while t:
	t -= 1
	(x, y, k) = ma()
	z = (k * y + k - 1) / (x - 1)
	z = ceil(z)
	cur = z * (x - 1) + 1
	while cur - y * k < k:
		z += 1
		cur = z * (x - 1) + 1
	while (z - 1) * (x - 1) + 1 - y * k >= k:
		z -= 1
	print(z + k)


T = int(input())
for _ in range(T):
	(x, y, k) = map(int, input().split())
	stick_for_coal = k * y
	stick_for_stick = k
	tot = stick_for_coal + stick_for_stick
	times = (tot - 1 + x - 2) // (x - 1)
	print(times + k)


n = int(input())
for i in range(n):
	a = list(map(int, input().split(' ')))
	c = a[2] * a[1]
	c = c + a[2] - 1
	d = a[0] - 1
	e = c % d
	f = c // d
	if e == 0:
		print(f + a[2])
	else:
		f = f + 1
		print(f + a[2])


R = lambda : map(int, input().split())
(t,) = R()
for _ in range(t):
	(x, y, k) = R()
	print(k - (1 - k * y - k) // (x - 1))


from sys import stdin
input = stdin.readline
from math import ceil
from decimal import Decimal
t = int(input())
for _ in range(t):
	(x, y, k) = map(int, input().split())
	ct = ceil(Decimal(k * y + k - 1) / Decimal(x - 1))
	print(k + ct)


t = int(input())
for case in range(t):
	(x, y, k) = list(map(int, input().split()))
	ans1 = (k + k * y + x - 3) // (x - 1)
	print(ans1 + k)


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

def solve(X, Y, K):
	ans = 0
	numSticks = 1
	numCoal = 0
	numSticks -= Y * K
	numCoal += K
	ans += K
	trade1 = (K - numSticks + X - 2) // (X - 1)
	ans += trade1
	return ans
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
TC = int(input())
for tc in range(1, TC + 1):
	(X, Y, K) = [int(x) for x in input().split()]
	ans = solve(X, Y, K)
	print(ans)


import math
t = int(input())
while t:
	(x, y, k) = list(map(int, input().split()))
	N = k * (1 + y) - 1
	D = x - 1
	ans = N // D + (N % D > 0) + k
	print(ans)
	t -= 1


import sys
input = sys.stdin.buffer.readline
T = int(input())
for testcase in range(T):
	(x, y, k) = map(int, input().split())
	res = (k + y * k - 2) // (x - 1) + 1 + k
	print(res)


def mi():
	return map(int, input().split())
from math import ceil as c
for _ in range(int(input())):
	(x, y, n) = mi()
	needed = n * y + n - 1
	trades = (needed + x - 2) // (x - 1)
	print(trades + n)


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
from math import ceil
for _ in range(int(input()) if True else 1):
	(x, y, k) = map(int, input().split())
	ans = ceil((y * k + k - 1) / (x - 1))
	for p in range(ans - 100, ans + 100):
		sticks = 1 + p * (x - 1) - y * k
		if sticks >= k:
			print(p + k)
			break


t = int(input())
for _ in range(t):
	(x, y, k) = (int(i) for i in input().split())
	sticks = (y + 1) * k
	one = (sticks - 1) // (x - 1)
	if (sticks - 1) % (x - 1):
		one += 1
	print(one + k)


from math import ceil
t = int(input())
for _ in range(t):
	counts = list(map(int, input().split()))
	cou = ceil(int(counts[1] * counts[2] - counts[0]) / int(counts[0] - 1))
	ost = counts[0] + (counts[0] - 1) * cou - counts[2] * counts[1]
	final = ceil((counts[2] - ost) / (counts[0] - 1))
	print(1 + cou + counts[2] + final)


import math
for _ in range(int(input())):
	(a, b, c) = list(map(int, input().split()))
	ans = (b + 1) * c - 1
	print((ans + a - 2) // (a - 1) + c)


def solve(x, y, k):
	need = k * (y + 1) - 1
	return (need + (x - 2)) // (x - 1) + k

def main():
	TT = int(input())
	for i in range(TT):
		(x, y, k) = map(int, input().split())
		print(solve(x, y, k))
main()


import math
for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	rs = k * y + k - 1
	tot = k
	tot += rs // (x - 1)
	if rs % (x - 1):
		print(tot + 1)
	else:
		print(tot)


import sys

def rl(proc=None):
	if proc is not None:
		return proc(sys.stdin.readline())
	else:
		return sys.stdin.readline().rstrip()

def srl(proc=None):
	if proc is not None:
		return list(map(proc, rl().split()))
	else:
		return rl().split()

def solve(x, y, k):
	need = y * k + k - 1
	return (need + (x - 2)) // (x - 1) + k

def main():
	T = rl(int)
	for t in range(1, T + 1):
		(x, y, k) = srl(int)
		print(solve(x, y, k))
main()


from math import ceil
for _ in range(int(input())):
	(x, y, k) = [int(i) for i in input().split()]
	inc = x - 1
	req = k * y + k - 1
	temp = 0
	if req % inc != 0:
		temp = 1
	print(req // inc + k + temp)


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	ans = abs(-(k * y - 1) // (x - 1))
	sti = 1 + (x - 1) * ans
	if sti == k * y:
		ans += 1
		sti += x - 1
	sti -= k * y
	ans += k
	ans += abs(-(k - sti) // (x - 1))
	print(ans)


def ceil(a, b):
	return (a + b - 1) // b
tc = int(input())
for _ in range(tc):
	(x, y, k) = map(int, input().split())
	n_first = ceil(k + y * k - 1, x - 1)
	n_second = k
	print(n_first + n_second)


import math
t = int(input())
while t > 0:
	(x, y, k) = map(int, input().split())
	ans1 = math.floor((k * y - 1) / (x - 1) + 1)
	rems = 1 + ans1 * (x - 1) - k * y
	if rems < k:
		ans1 += math.ceil((k - rems) / (x - 1))
	ans1 += k
	print(ans1)
	t -= 1


rw = int(input())
for qwe in range(rw):
	(x, y, k) = map(int, input().split())
	f = y * k
	fx = (f + k + x - 3) // (x - 1)
	print(fx + k)


for _ in range(0, int(input())):
	(x, y, k) = map(int, input().split())
	s = k * (y + 1) - 1
	if s % (x - 1) == 0:
		z = s // (x - 1)
	else:
		z = s // (x - 1) + 1
	print(z + k)


n = int(input())
for i in range(n):
	(x, y, k) = map(int, input().split())
	kolpp = k * y + k - 1
	ans = kolpp // (x - 1) + k
	if kolpp % (x - 1) > 0:
		ans += 1
	print(ans)


for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	total = y * k + k
	num = (total - 1) // (x - 1)
	if (total - 1) % (x - 1) == 0:
		ans = num
	else:
		ans = num + 1
	print(ans + k)


from math import *
for u in range(int(input())):
	(x, y, k) = map(int, input().split())
	s = k + y * k - 1
	if s % (x - 1) == 0:
		print(s // (x - 1) + k)
	else:
		print(s // (x - 1) + k + 1)


from collections import defaultdict as dd
from sys import stdin, stdout
from bisect import bisect_left
from math import log, sqrt
for t in range(int(stdin.readline().strip())):
	(x, y, k) = map(int, stdin.readline().strip().split())
	inx = x - 1
	req = y * k + k - 1
	if req % inx == 0:
		print(req // inx + k)
	else:
		print(req // inx + 1 + k)


t = int(input())
for _ in range(t):
	(x, y, k) = [int(x) for x in input().split()]
	ans = k
	X = k + k * y
	n = (X - 1) // (x - 1)
	if n * (x - 1) < X - 1:
		n += 1
	print(ans + n)


import decimal
t = int(input())
for _ in range(t):
	(x, y, k) = map(int, input().split())
	stk = (y + 1) * k
	trd = decimal.Decimal(stk - x) / decimal.Decimal(x - 1)
	trd += k
	if trd % 1 == 0:
		print(trd + 1)
	else:
		print(int(trd + 2))


t = int(input())
for you in range(t):
	l = input().split()
	x = int(l[0])
	y = int(l[1])
	k = int(l[2])
	z = k * (y + 1) - 1
	rem = z % (x - 1)
	if rem:
		print(z // (x - 1) + 1 + k)
	else:
		print(z // (x - 1) + k)


t = int(input())
l = []
for i in range(t):
	(x, y, k) = map(int, input().split())
	st = k * (y + 1)
	t = (st - 1) // (x - 1) + k
	if (st - 1) % (x - 1) != 0:
		l.append(t + 1)
	else:
		l.append(t)
for i in l:
	print(i)


for i in range(int(input())):
	(x, y, k) = map(int, input().split())
	z = k + k * y - 1
	r = x - 1
	o = z // r
	if z % r == 0:
		print(k + o)
	else:
		print(k + o + 1)


import math, sys
from collections import defaultdict, Counter, deque
from functools import reduce
INF = float('inf')
MOD = int(1000000000.0) + 7

def gcd(a, b):
	while b:
		(a, b) = (b, a % b)
	return a

def isPrime(n):
	if n <= 1:
		return False
	i = 2
	while i ** 2 <= n:
		if n % i == 0:
			return False
		i += 1
	return True

def primeFactors(n):
	factors = defaultdict(int)
	i = 2
	while i ** 2 <= n:
		while n % i == 0:
			factors[i] += 1
			n //= i
		i += 1
	if n > 1:
		factors[n] += 1
	return factors

def main():
	(x, y, k) = vars()
	total = (y + 1) * k
	s = total - x
	ans = (s + x - 2) // (x - 1) + 1 + k
	print(ans)

class DSU:

	def __init__(self, n):
		self.p = [i for i in range(n + 1)]
		self.size = [1 for i in range(n + 1)]
		self.minmax = [[i, i] for i in range(n + 1)]
		self.n = n

	def find(self, node):
		if self.p[node] != node:
			self.p[node] = self.find(self.p[node])
		return self.p[node]

	def union(self, source, dest):
		source = self.find(source)
		dest = self.find(dest)
		if source != dest:
			if self.size[source] < self.size[dest]:
				(source, dest) = (dest, source)
			self.p[dest] = source
			self.size[source] += self.size[dest]
			mini = min(self.minmax[source][0], self.minmax[dest][0])
			maxi = max(self.minmax[source][1], self.minmax[dest][1])
			self.minmax[source] = [mini, maxi]

def input():
	return sys.stdin.readline().rstrip('\n')

def print(*args, sep=' ', end='\n'):
	first = True
	for arg in args:
		if not first:
			sys.stdout.write(sep)
		sys.stdout.write(str(arg))
		first = False
	sys.stdout.write(end)

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

def array():
	return list(map(int, input().split()))
t = 1
t = int(input())
for _ in range(t):
	main()


from math import ceil
for i in range(int(input())):
	(x, y, k) = [int(i) for i in input().split()]
	a = -(-(y * k + k - 1) // (x - 1))
	print(a + k)


t = int(input())
a = []
for i in range(t):
	(x, y, k) = map(int, input().split())
	coal = k
	sticks = coal * y
	sticks += k
	sticks = sticks - 1
	total = sticks // (x - 1)
	other = sticks % (x - 1)
	if other:
		total = total + 1
	a.append(total + k)
print(*a, sep='\n')


for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	t = (y * k - x) // (x - 1) + 1
	if x + (t - 1) * (x - 1) != y * k:
		t += 1
	s = x + (t - 1) * (x - 1)
	t += 1
	s += x - 1
	s = abs(s - y * k) + x - 1
	p = (k - s) // (x - 1) + 1
	if s + (p - 1) * (x - 1) != k:
		p += 1
	print(t + p + k)


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 print_list(l):
	print(' '.join(map(str, l)))
for _ in range(N()):
	(x, y, k) = RL()
	print(k - (-k * y - k + 1) // (x - 1))


import math
t = int(input())
for _ in range(t):
	(x, y, k) = map(int, input().split())
	sol = k
	pre_sol = k * (y + 1) - 1
	rem = pre_sol % (x - 1)
	if rem == 0:
		sol += pre_sol // (x - 1)
	else:
		sol += pre_sol // (x - 1) + 1
	print(sol)


import math
for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	c = ((y + 1) * k - x) // (x - 1) + 1
	if x + (c - 1) * (x - 1) < (y + 1) * k:
		c += 1
	print(c + k)


t = int(input())
for _ in range(t):
	(x, y, k) = map(int, input().split())
	z = k * (y + 1)
	ans = k + (x + z - 3) // (x - 1)
	print(ans)


from sys import stdin
input = stdin.buffer.readline
for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	t = (k * y + x - 1 - 1) // (x - 1)
	a = 1 + (x - 1) * t - k * y
	print(t + max(0, (k - a + x - 1 - 1) // (x - 1)) + k)


def ans_if_list(ans):
	if isinstance(ans, str):
		return ans
	elif isinstance(ans, int):
		return ans
	else:
		return ' '.join((str(ans[i]) for i in range(len(ans))))

def input_list(typ='int'):
	if typ == 'int':
		return list(map(int, input().split()))
	elif typ == 'str':
		return list(input())

def main():
	t = int(input())
	for q in range(t):
		(x, y, k) = input_list()
		ans = (y * k + k - 1) // (x - 1) + ((y * k + k - 1) % (x - 1) > 0) + k
		print(ans)
main()


for t in range(int(input())):
	(x, y, k) = map(int, input().split())
	out = k
	val = (y * k + k - 1) % (x - 1)
	if val:
		out += 1
	out += (y * k + k - 1) // (x - 1)
	print(out)


from sys import stdin
t = int(stdin.readline())
for loop in range(t):
	(x, y, k) = map(int, stdin.readline().split())
	need = k + y * k
	l = 0
	r = 10 ** 30
	while r - l != 1:
		m = (l + r) // 2
		if 1 + (x - 1) * m >= need:
			r = m
		else:
			l = m
	print(r + k)


def Ans():
	N = int(input())
	for i in range(N):
		ans = 0
		A = input().split()
		a = int(A[0])
		b = int(A[1])
		c = int(A[2])
		ans += -(-(c + b * c - 1) // (a - 1))
		print(ans + c)
Ans()


import os
from sys import stdin, stdout

def solve(tc):
	(x, y, k) = map(int, stdin.readline().split())
	needed = (y + 1) * k
	cnt = (needed - 1) // (x - 1)
	if (needed - 1) % (x - 1):
		cnt += 1
	print(cnt + k)
tcs = 1
tcs = int(stdin.readline().strip())
tc = 1
while tc <= tcs:
	solve(tc)
	tc += 1


for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	low = 0
	high = 100000000000000000000
	while low < high:
		mid = low + high >> 1
		if x + mid * (x - 1) < k * (y + 1):
			low = mid + 1
		else:
			high = mid
	print(low + k + 1)


a = int(input())
for i in range(a):
	b = input()
	vse = [int(l) for l in b.split(' ')]
	if (vse[1] * vse[2] + vse[2] - 1) % (vse[0] - 1) == 0:
		print((vse[1] * vse[2] + vse[2] - 1) // (vse[0] - 1) + vse[2])
	else:
		print((vse[1] * vse[2] + vse[2] - 1) // (vse[0] - 1) + 1 + vse[2])


import math
t = int(input())
for i in range(t):
	(x, y, k) = map(int, input().split())
	ost = ((y + 1) * k - 1) % (x - 1)
	a_1 = ((y + 1) * k - 1) // (x - 1) + (1 if ost else 0)
	a_2 = k
	print(a_1 + a_2)


t = int(input())
for case in range(t):
	(x, y, z) = input().split(' ')
	(palos, coste, z) = (int(x) - 1, int(y), int(z))
	necesidad = (1 + coste) * z - 1
	print((necesidad - 1) // palos + 1 + z)


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('\n'.join(map(str, var)) + '\n')

def out(var):
	sys.stdout.write(str(var) + '\n')
from decimal import Decimal
mod = int(1000000000.0) + 7
INF = float('inf')
for t in range(int(data())):
	(x, y, k) = mdata()
	a = k * (y + 1) - 1
	ans = a // (x - 1) + k + (1 if a % (x - 1) else 0)
	out(ans)


t = int(input())
while t:
	(x, y, k) = map(int, input().split())
	coal = k
	sticks = coal * y
	sticks += k
	sticks -= 1
	total = sticks // (x - 1)
	other = sticks % (x - 1)
	if other:
		total += 1
	print(total + k)
	t -= 1


gans = []
for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	cnt = ((y + 1) * k - 2) // (x - 1) + 1 + k
	gans.append(cnt)
print('\n'.join(map(str, gans)))


import math

def tc():
	(x, y, k) = map(int, input().split())
	need = (y + 1) * k
	trades = (need - 1) // (x - 1)
	if (need - 1) % (x - 1):
		trades += 1
	trades += k
	print(trades)
T = int(input())
for _ in range(T):
	tc()


for i in range(int(input())):
	(x, y, k) = [int(i) for i in input().split()]
	sticks = k * (y + 1) - 1
	if sticks % (x - 1):
		temp = sticks // (x - 1) + 1
	else:
		temp = sticks // (x - 1)
	print(temp + k)


import sys
from os import path
if path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
import math

def solve():
	a = [int(i) for i in input().split()]
	(x, y, k) = a
	need = k * y
	need += k
	have = 1
	ans = 0
	x -= 1
	ans += int(need - have + x - 1) // x
	ans += k
	print(ans)

def main():
	tc = int(input().strip())
	for case in range(tc):
		solve()
main()


from math import ceil
for _ in range(int(input())):
	X = list(map(int, input().split()))
	StickNeed = X[-1] * X[1]
	Move = 0
	Sum = 0
	Trade = ceil((StickNeed - 1) / (X[0] - 1))
	Move += Trade
	Sum = Trade * (X[0] - 1) + 1
	if Sum == StickNeed:
		Move += 1
		Sum += X[0] - 1
	Sum -= StickNeed
	Move += max(0, ceil((X[-1] - Sum) / (X[0] - 1)))
	print(Move + X[-1])


import io, os
R = lambda : map(int, input().split())
for _ in range(int(input())):
	(x, y, k) = R()
	nd = k * (y + 1) - 1
	print((nd + x - 2) // (x - 1) + k)


for i in [0] * int(input()):
	(a, b, c) = map(int, input().split())
	a -= 1
	sti = b * c + c - 1
	print(0 - -sti // a + c)


import sys
readline = sys.stdin.readline
INF = 1 << 60

def read_int():
	return int(readline())

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

def read_float():
	return float(readline())

def read_float_n():
	return list(map(float, readline().split()))

def read_str():
	return readline().strip()

def read_str_n():
	return readline().strip().split()

def ep(*args):
	print(*args, file=sys.stderr)

def mt(f):
	import time

	def wrap(*args, **kwargs):
		s = time.perf_counter()
		ret = f(*args, **kwargs)
		e = time.perf_counter()
		ep(e - s, 'sec')
		return ret
	return wrap

def slv(X, Y, K):
	Z = K * Y + K - 1
	N = -(-Z // (X - 1))
	ans = K + N
	return ans

def main():
	for _ in range(read_int()):
		(X, Y, K) = read_int_n()
		print(slv(X, Y, K))
main()


from sys import stdin

def main():
	input = lambda : stdin.readline()[:-1]
	T = int(input())
	for _ in [0] * T:
		(X, Y, K) = map(int, input().split())
		stick = K + K * Y
		ans = (stick + X - 3) // (X - 1) + K
		print(ans)
main()


for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	stick = 1
	c = k + 1
	stick_req = y * k + k
	stick_req -= x
	if stick_req % (x - 1) == 0:
		c += stick_req // (x - 1)
	else:
		c += stick_req // (x - 1) + 1
	print(c)


t = int(input())
for ii in range(t):
	(x, y, k) = map(int, input().split())
	coals = k
	sticks = k
	sticks = k * y + k
	num = (sticks - 1) // (x - 1)
	if (sticks - 1) % (x - 1) != 0:
		num += 1
	num += k
	print(num)


from typing import Match
import math

class Solution:

	def solve(self, x, y, k):
		ans = k
		n_of_stickes = k * y + k - 1
		ans += (n_of_stickes + x - 2) // (x - 1)
		return ans

def main():
	obj = Solution()
	t = int(input())
	while t:
		(x, y, k) = list(map(int, input().split()))
		print(obj.solve(x, y, k))
		t -= 1
main()


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	(x, y, k) = [int(i) for i in input().split()]
	stick_need = k + k * y - 1
	num_stick_trade = (stick_need + x - 2) // (x - 1)
	print(num_stick_trade + k)


from math import ceil
ni = int(input())
for ki in range(ni):
	(s, c, t) = map(int, input().split())
	needed = t * c + t
	needed -= s
	if needed % (s - 1) == 0:
		print(1 + needed // (s - 1) + t)
		continue
	print(2 + needed // (s - 1) + t)


from __future__ import division, print_function
import bisect
import math
import heapq
import itertools
import sys
from collections import deque
from atexit import register
from collections import Counter
from functools import reduce
if sys.version_info[0] < 3:
	from io import BytesIO as stream
else:
	from io import StringIO as stream

def sync_with_stdio(sync=True):
	global input, flush
	if sync:
		flush = sys.stdout.flush
	else:
		sys.stdin = stream(sys.stdin.read())
		input = lambda : sys.stdin.readline().rstrip('\r\n')
		sys.stdout = stream()
		register(lambda : sys.__stdout__.write(sys.stdout.getvalue()))
for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	print(((y + 1) * k + (x - 3)) // (x - 1) + k)


n = int(input())
for i in range(n):
	(a, b, c) = map(int, input().split())
	print((c + b * c + a - 3) // (a - 1) + c)


from math import floor, ceil
t = int(input())
while t > 0:
	(x, y, k) = [int(i) for i in input().split()]
	sticks = 1
	coal = 0
	trade = 0
	s_for_coal = y * k
	n = (s_for_coal - 1) / (x - 1) + 1
	if ceil(n) == n:
		trade += int(n)
		sticks = 1 + int(n) * (x - 1)
	else:
		trade += floor(n)
		sticks = 1 + floor(n) * (x - 1)
	sticks -= s_for_coal
	trade += k
	n = (k - sticks) / (x - 1) + 1
	trade += ceil(n) - 1
	print(trade)
	t -= 1


t = int(input())
for i in range(t):
	arr = [int(i) for i in input().split()]
	x = arr[0]
	y = arr[1]
	k = arr[2]
	n = (k * y + k - 1) // (x - 1)
	while n * x - (n - 1) - y * k < k:
		n += 1
	print(n + k)


T = int(input())
for i in range(T):
	(x, y, k) = map(int, input().split())
	s = (y + 1) * k - 1
	if s % (x - 1) != 0:
		s = s + x - 1
	O = s // (x - 1) + k
	print(O)


test_cases = int(input())
for test_case in range(test_cases):
	(x, y, k) = list(map(int, input().split()))
	ans = (k * (y + 1) - 1) // (x - 1) + k
	if (k * (y + 1) - 1) % (x - 1) == 0:
		print(ans)
	else:
		print(ans + 1)


t = int(input())
for _ in range(t):
	tc = [int(i) for i in input().split()]
	(x, y, k) = (tc[0], tc[1], tc[2])
	z = (k * (y + 1) - 1) // (x - 1)
	print()
	if (k * (y + 1) - 1) % (x - 1) == 0:
		print(z + k)
	else:
		print(z + k + 1)


import math
import random
import heapq, bisect
import sys
from collections import deque, defaultdict
from fractions import Fraction
import sys
import threading
from collections import defaultdict
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

class SegmentTree1:

	def __init__(self, data, default=0, func=lambda a, b: max(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 binary(x, length):
	y = bin(x)[2:]
	return y if len(y) >= length else '0' * (length - len(y)) + y

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())):
	(x, y, k) = map(int, input().split())
	tot = math.ceil(Fraction(k + y * k - 1, x - 1)) + k
	print(tot)


t = int(input())
for _ in range(t):
	(x, y, k) = map(int, input().split())
	pal = (y + 1) * k - 1
	ans = k
	ans += pal // (x - 1)
	pal_obmen = pal // (x - 1)
	if pal % (x - 1) > 0:
		ans += 1
	print(ans)


import math
testCases = input()
for i in range(int(testCases)):
	(x, y, k) = map(int, input().split())
	totalSticks = y * k + k
	totalSticks -= 1
	exchange = totalSticks // (x - 1)
	if totalSticks % (x - 1) != 0:
		exchange += 1
	print(exchange + k)


import math

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

def solve():
	(x, y, k) = map(int, input().split(' '))
	need_x = k * y + k
	x_times = ceil(need_x - 1, x - 1)
	y_times = k
	return x_times + y_times
t = int(input())
for i in range(t):
	print(solve())


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

def solve():
	(a, b, k) = list(map(int, input().split()))
	a = a - 1
	req = k * b + k
	ans = req - 1
	ans = (ans - 1) // a + 1
	print(ans + k)
t = 1
t = int(input())
for _ in range(t):
	solve()


import sys
input = sys.stdin.readline
from bisect import bisect_left
from bisect import bisect_right
from math import ceil, factorial

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 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 float_array():
	return list(map(float, 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())):
	(x, y, k) = int_array()
	sticks = k * (y + 1)
	ans = (sticks - 1 + x - 2) // (x - 1)
	print(ans + k)


def ceil(a, b):
	return (a + b - 1) // b
t = int(input())
for _ in range(t):
	(x, y, k) = map(int, input().split())
	a = 1
	ans = 0
	while 1:
		if a * x <= k * (y + 1):
			ans += a
			a *= x
		else:
			ans += ceil(k * (y + 1) - a, x - 1)
			break
	print(ans + k)


from math import ceil, floor

def ceil_div(a, b):
	return int((a + b - 1) // b)
t = int(input())
while t > 0:
	(x, y, k) = map(int, input().split())
	tota = k + y * k - 1
	ans = ceil_div(tota, x - 1)
	ans += k
	print(ans)
	t -= 1


import time, math as mt, bisect as bs, 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 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 bfs(adj, v):
	visited = [False] * (v + 1)
	q = deque()
	while q:
		pass

def sieve():
	li = [True] * (2 * 10 ** 5 + 5)
	(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(2 * 10 ** 5 + 5):
		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

def readTree(n, e):
	adj = [set() for i in range(n + 1)]
	for i in range(e):
		(u1, u2) = IP()
		adj[u1].add(u2)
	return adj
mod = 10 ** 9 + 7

def solve():
	(x, y, k) = IP()
	tot_sticks = k * y + k - 1
	trans = -(tot_sticks // -(x - 1))
	print(trans + k)
	return
t = II()
for i in range(t):
	solve()


exec(int(input()) * 'x,y,k=map(int,input().split());print(k-(1-k*(y+1))//(x-1));')


import math
cases = int(input())
for t in range(cases):
	(x, y, k) = list(map(int, input().split()))
	if x - 1 > 1:
		v = ((y + 1) * k - 1) % (x - 1)
		if v == 0:
			v1 = int(((y + 1) * k - 1) // (x - 1))
		else:
			v1 = v1 = int(((y + 1) * k - 1) // (x - 1)) + 1
	else:
		v1 = (y + 1) * k - 1
	print(v1 + k)


import math
t = int(input())
for case in range(t):
	(x, y, k) = [int(s) for s in input().split(' ')]
	u = (k * (y + 1) - 1) // (x - 1) + k + int((k * (y + 1) - 1) % (x - 1) != 0)
	print(u)


from math import ceil
from decimal import *
getcontext().prec = 20
t = int(input())
for i in range(t):
	(x, y, k) = map(int, input().split())
	a = k * y + k - 1
	b = x - 1
	if a % b == 0:
		print(a // b + k)
	else:
		print(a // b + k + 1)


import sys
input = sys.stdin.readline

def solution():
	(x, y, k) = map(int, input().split())
	y_n = k
	require_stick = y * y_n + (k - 1)
	x_n = require_stick // (x - 1)
	if require_stick % (x - 1):
		x_n += 1
	print(y_n + x_n)
T = int(input())
for _ in range(T):
	solution()


import sys
import math
from collections import defaultdict, Counter
input = sys.stdin.readline

def print(x):
	sys.stdout.write(str(x) + '\n')
t = int(input())
for i in range(t):
	(x, y, k) = map(int, input().split())
	need = y * k - 1
	if need % (x - 1) == 0:
		left = x - 1
		ans = need // (x - 1) + 1
	else:
		left = 1 + int(math.ceil(need / (x - 1))) * (x - 1) - y * k
		ans = int(math.ceil(need / (x - 1)))
	newneed = k - left
	ans += int(math.ceil(newneed / (x - 1))) + k
	print(ans)


import sys
import math
for _ in range(int(input())):
	(x, y, k) = map(int, sys.stdin.readline().split())
	if (y * k + k - 1) % (x - 1) == 0:
		m = (y * k + k - 1) // (x - 1)
	else:
		m = (y * k + k - 1) // (x - 1) + 1
	print(m + k)


from math import ceil
for _ in range(int(input())):
	(x, y, k) = list(map(int, input().split()))
	if k == 0:
		print(0)
	else:
		temp = k + y * k - 1
		new = temp // (x - 1)
		if temp % (x - 1) != 0:
			new += 1
		print(new + k)


from math import ceil
cases = int(input())
for case in range(cases):
	(x, y, k) = [int(x) for x in input().split()]
	print(((y + 1) * k - 1 + x - 2) // (x - 1) + k)


import math
n = int(input())
for i in range(n):
	arr = [int(i) for i in input().split()]
	coal = arr[1] * arr[2]
	stick = arr[2]
	torch = coal + stick
	if (torch - 1) % (arr[0] - 1) == 0:
		ans = (torch - 1) // (arr[0] - 1)
	else:
		ans = (torch - 1) // (arr[0] - 1) + 1
	print(ans + arr[2])


import math
t = int(input())
for _ in range(t):
	(x, y, k) = map(int, input().split())
	ans = 0
	if (y * k - 1) % (x - 1):
		ans += math.ceil((y * k - 1) / (x - 1))
		r = ans * (x - 1) + 1 - y * k
		ans += k
		if r < k:
			ans += math.ceil((k - r) / (x - 1))
	else:
		ans += math.ceil((y * k - 1) / (x - 1)) + 1
		r = ans * (x - 1) + 1 - k * y
		ans += k
		if r < k:
			ans += math.ceil((k - r) / (x - 1))
	print(ans)


t = int(input())
import math
from decimal import Decimal
for test in range(t):
	(x, y, k) = map(int, input().split())
	trades = math.ceil(Decimal(k * y + k - 1) / (x - 1)) + k
	print(trades)


import math as m
from decimal import Decimal
for t in range(int(input())):
	(x, y, k) = map(int, input().split())
	p1 = k * (y + 1) - 1
	p2 = x - 1
	p = (p1 + p2 - 1) // p2
	print(p + k)


t = int(input())
while t > 0:
	(x, y, k) = map(int, input().split())
	total = k * y + k
	div = x - 1
	total -= 1
	ans = (total + div - 1) // div
	ans += k
	print(ans)
	t -= 1


a = int(input())
for i in range(a):
	(x, y, z) = map(int, input().split())
	b = int((z * (y + 1) - 1 + (x - 2)) // (x - 1))
	print(b + z)


for i in range(int(input())):
	(x, y, z) = map(int, input().split())
	print((z * y + (z - 1)) // (x - 1) + int((z * y + (z - 1)) % (x - 1) > 0) + z)


from math import *
from collections import deque
from copy import deepcopy
import sys

def inp():
	return sys.stdin.readline().rstrip('\r\n')

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

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

def lis():
	return list(map(int, inp().split()))

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

def ncr(n, r):
	return factorial(n) // (factorial(r) * factorial(max(n - r, 1)))

def stringlis():
	return list(map(str, inp().split()))

def out(var):
	sys.stdout.write(str(var))

def printlist(a):
	print(' '.join((str(a[i]) for i in range(len(a)))))

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
t = int(inp())
for _ in range(t):
	(x, y, k) = multi()
	ans = k * y + k + x - 2
	ans2 = (ans - 1) // (x - 1)
	print(k + ans2)


import math

def cell(a, b):
	return (a + b - 1) // b
n = int(input())
for i in range(n):
	(x, y, k) = map(int, input().split())
	new = cell(k * y + k - 1, x - 1)
	new += k
	print(new)


test = int(input())
for _ in range(test):
	(x, y, k) = map(int, input().split())
	ans = k - (1 - y * k - k) // (x - 1)
	print(ans)


import math

def solve(a, b):
	return (a + b - 1) // b
for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	sticks = k - 1 + y * k
	diff = x - 1
	ans = solve(sticks, diff)
	ans += k
	print(ans)


from math import ceil as c
for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	r = k - 1 + k * y
	q = r // (x - 1)
	b = k + q
	c = q
	if c * (x - 1) < r:
		b += 1
	print(b)


for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	cnt = 0
	need_sticks = (y + 1) * k
	cnt = (need_sticks - 1 + x - 2) // (x - 1)
	print(cnt + k)


import io
import os
import sys
import math
from decimal import Decimal
fileno = sys.stdin.fileno()
input = io.BytesIO(os.read(fileno, os.fstat(fileno).st_size)).readline
T = int(input())
for t in range(T):
	(stick_price, coal_price, count) = map(int, input().split())
	stick_price -= 1
	ans = count
	sticks_for_coals = coal_price * count
	num = math.ceil(Decimal(sticks_for_coals + count - 1) / stick_price)
	print(ans + num)


import math
t = int(input())

def f(x, y, k):
	needed = y * k + k
	return k + (needed - 1 + x - 2) // (x - 1)
for _ in range(t):
	(x, y, k) = [int(x) for x in input().split()]
	print(f(x, y, k))


def devide(a, b):
	if a % b == 0:
		return a // b
	else:
		return a // b + 1

def solve(x, y, k):
	rs = k + k * y
	return devide(rs - 1, x - 1) + k
for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	print(solve(x, y, k))


import sys, bisect, string, math, time, functools, random, fractions
from heapq import heappush, heappop, heapify
from collections import deque, defaultdict, Counter
from itertools import permutations, combinations, groupby
rep = range
R = range

def Golf():
	(n, *t) = map(int, open(0).read().split())

def I():
	return int(input())

def S_():
	return input()

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

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

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

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

def LI_():
	return [int(i) - 1 for i in input().split()]

def NI(n):
	return [int(input()) for i in range(n)]

def NI_(n):
	return [int(input()) - 1 for i in range(n)]

def NLI(n):
	return [[int(i) for i in input().split()] for i in range(n)]

def NLI_(n):
	return [[int(i) - 1 for i in input().split()] for i in range(n)]

def StoLI():
	return [ord(i) - 97 for i in input()]

def ItoS(n):
	return chr(n + 97)

def LtoS(ls):
	return ''.join([chr(i + 97) for i in ls])

def RA():
	return map(int, open(0).read().split())

def RLI(n=8, a=1, b=10):
	return [random.randint(a, b) for i in range(n)]

def RI(a=1, b=10):
	return random.randint(a, b)

def INP():
	N = 10
	A = 10
	n = random.randint(1, N)
	a = [random.randint(1, A) for i in range(n)]
	return (n, a)

def Rtest(T):
	(case, err) = (0, 0)
	for i in range(T):
		inp = INP()
		a1 = naive(*inp)
		a2 = solve(*inp)
		if a1 != a2:
			print((a1, a2), inp)
			err += 1
		case += 1
	print('Tested', case, 'case with', err, 'errors')

def GI(V, E, ls=None, Directed=False, index=1):
	org_inp = []
	g = [[] for i in range(V)]
	FromStdin = True if ls == None else False
	for i in range(E):
		if FromStdin:
			inp = LI()
			org_inp.append(inp)
		else:
			inp = ls[i]
		if len(inp) == 2:
			(a, b) = inp
			c = 1
		else:
			(a, b, c) = inp
		if index == 1:
			a -= 1
			b -= 1
		aa = (a, c)
		bb = (b, c)
		g[a].append(bb)
		if not Directed:
			g[b].append(aa)
	return (g, org_inp)

def GGI(h, w, search=None, replacement_of_found='.', mp_def={'#': 1, '.': 0}, boundary=1):
	mp = [boundary] * (w + 2)
	found = {}
	for i in R(h):
		s = input()
		for char in search:
			if char in s:
				found[char] = (i + 1) * (w + 2) + s.index(char) + 1
				mp_def[char] = mp_def[replacement_of_found]
		mp += [boundary] + [mp_def[j] for j in s] + [boundary]
	mp += [boundary] * (w + 2)
	return (h + 2, w + 2, mp, found)

def TI(n):
	return GI(n, n - 1)

def accum(ls):
	rt = [0]
	for i in ls:
		rt += [rt[-1] + i]
	return rt

def bit_combination(n, base=2):
	rt = []
	for tb in R(base ** n):
		s = [tb // base ** bt % base for bt in R(n)]
		rt += [s]
	return rt

def gcd(x, y):
	if y == 0:
		return x
	if x % y == 0:
		return y
	while x % y != 0:
		(x, y) = (y, x % y)
	return y

def YN(x):
	print(['NO', 'YES'][x])

def Yn(x):
	print(['No', 'Yes'][x])

def show(*inp, end='\n'):
	if show_flg:
		print(*inp, end=end)
mo = 10 ** 9 + 7
inf = float('inf')
FourNb = [(-1, 0), (1, 0), (0, 1), (0, -1)]
EightNb = [(-1, 0), (1, 0), (0, 1), (0, -1), (1, 1), (-1, -1), (1, -1), (-1, 1)]
compas = dict(zip('WENS', FourNb))
cursol = dict(zip('LRUD', FourNb))
l_alp = string.ascii_lowercase
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
input = lambda : sys.stdin.readline().rstrip()

class Comb:

	def __init__(self, n, mo=10 ** 9 + 7):
		self.fac = [0] * (n + 1)
		self.inv = [1] * (n + 1)
		self.fac[0] = 1
		self.fact(n)
		for i in range(1, n + 1):
			self.fac[i] = i * self.fac[i - 1] % mo
			self.inv[n] *= i
			self.inv[n] %= mo
		self.inv[n] = pow(self.inv[n], mo - 2, mo)
		for i in range(1, n):
			self.inv[n - i] = self.inv[n - i + 1] * (n - i + 1) % mo
		return

	def fact(self, n):
		return self.fac[n]

	def invf(self, n):
		return self.inv[n]

	def comb(self, x, y):
		if y < 0 or y > x:
			return 0
		return self.fac[x] * self.inv[x - y] * self.inv[y] % mo
show_flg = False
show_flg = True
ans = 0

def solve_A(x, y, k):
	a = (k * y + k - 1 + x - 2) // (x - 1)
	return a + k
for _ in range(I()):
	ans = 0
	(x, y, k) = LI()
	ans = solve_A(x, y, k)
	print(ans)


def solve(x, y, k):
	moves = 0
	req_stick = y * k
	total_sticks = k + req_stick
	total_sticks -= 1
	if total_sticks % (x - 1) != 0:
		moves += 1
	moves += total_sticks // (x - 1)
	return moves + k
t = int(input())
while t:
	(x, y, k) = map(int, input().split(' '))
	print(solve(x, y, k))
	t -= 1


import math
t = int(input())
while t:
	(x, y, k) = map(int, input().split())
	p = k + k * y
	bp = p
	c = k + 1
	p -= x
	o = p // (x - 1)
	if (x - 1) * o + x >= bp:
		c += o
	else:
		c += o
		c += 1
	print(c)
	t -= 1


t = int(input())
sumx = 1
op = 0
while t != 0:
	(x, y, k) = map(int, input().split())
	op = (y * k + k - 1) // (x - 1)
	if (y * k + k - 1) % (x - 1) != 0:
		op += 1
	op += k
	print(op)
	t = t - 1
	op = 0


def main():
	t = int(input())
	for _ in range(t):
		(x, y, k) = map(int, input().split())
		x -= 1
		needed = k + k * y - 1
		(q, r) = (needed // x, needed % x)
		print(q + (r != 0) + k)
main()


from math import ceil
from collections import deque, defaultdict

def solve(a, n):
	for i in range(1, n):
		a[i] += a[i - 1]
	k = 0
	for i in range(n):
		if a[i] < 0:
			k = i
	return k
t = int(input())
for _ in range(t):
	(x, y, k) = map(int, input().split())
	ans = k
	target = k + k * y
	if (target - 1) % (x - 1) == 0:
		ans += (target - 1) // (x - 1)
		print(ans)
	else:
		ans += (target - 1) // (x - 1) + 1
		print(ans)


from decimal import Decimal
from math import ceil
t = int(input())
for _ in range(t):
	(x, y, k) = map(int, input().split())
	stick_trades = (k * y + k - 1 + x - 2) // (x - 1)
	print(stick_trades + k)


from sys import stdin
nii = lambda : map(int, stdin.readline().split())
lnii = lambda : list(map(int, stdin.readline().split()))
t = int(input())
for i in range(t):
	(x, y, k) = nii()
	ans = (k - 1 + k * y + (x - 1) - 1) // (x - 1)
	print(ans + k)


from functools import reduce
import os
import sys
from collections import *
from math 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 [int(i) for i in input()]

def starr():
	return [str(x) for x in input().split()]

def inn():
	return int(input())

def svalue():
	return tuple(map(str, input().split()))

def parr():
	return [value() for i in range(n)]
mo = 1000000007
for _ in range(inn()):
	(x, y, k) = value()
	res = k * y + k
	val = (res - 1) // (x - 1)
	if (res - 1) % (x - 1) != 0:
		val += 1
	print(val + k)


t = int(input())
for g in range(t):
	(x, y, k) = map(int, input().split())
	p = (y + 1) * k
	ans = (p - 1) // (x - 1)
	if (p - 1) % (x - 1) != 0:
		ans += 1
	ans += k
	print(ans)


def ceil_div(a, b):
	return (a + b - 1) // b
t = int(input())
while t:
	t -= 1
	(x, y, k) = list(map(int, input().split()))
	x -= 1
	total = k - 1 + y * k
	ans = ceil_div(total, x)
	ans += k
	print(ans)


from math import ceil
for _ in range(int(input())):
	(x, y, k) = [int(x) for x in input().split()]
	a = k * (1 + y) - 1
	print(a // (x - 1) + int(a % (x - 1) != 0) + k)


import math
t = int(input())
while t > 0:
	t -= 1
	(x, y, k) = map(int, input().split())
	cnt = 0
	sticks = k + y * k - 1
	if sticks % (x - 1) == 0:
		cnt = sticks // (x - 1) + k
	else:
		cnt = sticks // (x - 1) + k + 1
	print(cnt)


t = int(input())
for i in range(t):
	(sticks, coals, torches) = map(int, input().split())
	coalsticks = torches * coals
	neededsticks = torches - 1 + coalsticks
	buynumber = 0
	if neededsticks % (sticks - 1) == 0:
		buynumber = neededsticks // (sticks - 1)
	else:
		buynumber = neededsticks // (sticks - 1) + 1
	print(buynumber + torches)


t = int(input())
while t > 0:
	t -= 1
	(x, y, k) = input().strip().split(' ')
	x = int(x)
	y = int(y)
	k = int(k)
	s = k * y + k
	p = s // (x - 1)
	c = 1 + p * (x - 1)
	while c < s:
		c += x - 1
		p += 1
	while c > s:
		c -= x - 1
		p -= 1
	while c < s:
		c += x - 1
		p += 1
	print(p + k)


for i in range(int(input())):
	l = [int(j) for j in input().split(' ')]
	ans = 0
	coal = l[2]
	ans += coal
	stickreq = coal * l[1] + l[2]
	steps = int((stickreq - 1) // (l[0] - 1))
	if (stickreq - 1) % (l[0] - 1) != 0:
		steps += 1
	ans += steps
	print(ans)


def main():
	t = int(input())
	for _ in range(t):
		(x, y, k) = map(int, input().split())
		n = k * (y + 1) - 1
		if n % (x - 1) == 0:
			print(n // (x - 1) + k)
		else:
			print(n // (x - 1) + 1 + k)
main()


from math import ceil

def read_int():
	return int(input())

def read_ints():
	return list(map(int, input().split(' ')))
t = read_int()
for case_num in range(t):
	(x, y, k) = read_ints()
	a = (k * (y + 1) - 2) // (x - 1) + 1 + k
	print(a)


for sfs in range(int(input())):
	(a, b, k) = map(int, input().split())
	x = b * k + k - 1
	a -= 1
	print(x // a + min(1, x % a) + k)


import os, sys
from io import IOBase, BytesIO
py2 = round(0.5)
if py2:
	from future_builtins import ascii, filter, hex, map, oct, zip
	range = xrange
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')
import sys

class ostream:

	def __lshift__(self, a):
		sys.stdout.write(str(a))
		return self
cout = ostream()
endl = '\n'
import math

def solve():
	t = int(input())
	for _ in range(t):
		(x, y, k) = map(int, input().split())
		print(((y + 1) * k - 1 + x - 2) // (x - 1) + k)

def main():
	solve()
main()


import math
t = int(input())
for i in range(t):
	(x, y, k) = map(int, input().split())
	to = k * y + k - 1
	a = (to + x - 2) // (x - 1)
	print(a + k)


for _ in range(int(input())):
	(x, y, k) = [int(_) for _ in input().split()]
	s2 = y * k
	n = (s2 - x) / (x - 1) + 1
	n = int(n) + 1
	r = x + (n - 1) * (x - 1) - s2
	c = n + k
	if k <= r:
		print(c)
	else:
		u = (k - r) / (x - 1)
		if u == int(u):
			print(c + int(u))
		else:
			print(c + int(u) + 1)


import sys
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
ns = lambda : readline().rstrip()
ni = lambda : int(readline().rstrip())
nm = lambda : map(int, readline().split())
nl = lambda : list(map(int, readline().split()))
t = ni()
for _ in range(t):
	(x, y, k) = map(int, readline().split())
	ans = k
	k = k * y + k - 1
	if k % (x - 1) == 0:
		ans += k // (x - 1)
	else:
		ans += k // (x - 1) + 1
	print(ans)


from sys import *
input = stdin.readline
tc = int(input())
for tcase in range(tc):
	(x, y, k) = map(int, input().split())
	total = k * y + k
	lo = 1
	hi = 10 ** 20
	ans = -1
	while lo <= hi:
		mid = (lo + hi) // 2
		sticks = mid * x - (mid - 1)
		if sticks >= total:
			ans = mid
			hi = mid - 1
		else:
			lo = mid + 1
	assert ans != -1
	res = ans + k
	print(res)


t = int(input())
while t > 0:
	(x, y, k) = input().split()
	(x, y, k) = (int(x), int(y), int(k))
	if (k * (y + 1) - x) % (x - 1) == 0:
		print(1 + (k * (y + 1) - x) // (x - 1) + k)
	else:
		print(1 + (1 + (k * (y + 1) - x) // (x - 1)) + k)
	t -= 1


import math
import os
import random
import re
import sys
from collections import defaultdict, Counter, deque
import heapq
from functools import lru_cache
from itertools import accumulate, chain, combinations, permutations, groupby, zip_longest
from math import floor, ceil, sqrt

def solve(x, y, k):
	s_needed = k + k * y - 1
	t1 = s_needed // (x - 1)
	return t1 + min(1, s_needed % (x - 1)) + k
t = int(input())
res = []
for _ in range(t):
	(x, y, k) = list(map(int, input().split()))
	res += (solve(x, y, k),)
for v in res:
	print(v)


from math import ceil, floor, gcd, fabs, factorial, fmod, sqrt, inf

def sp():
	return map(int, input().split())
t = int(input())
for _ in range(t):
	(x, y, k) = sp()
	print(ceil((k * (y + 1) + x - 3) // (x - 1)) + k)


from sys import stdin, stdout
from math import ceil

def main():
	for _ in range(int(stdin.readline())):
		(X, Y, K) = list(map(int, stdin.readline().split()))
		X -= 1
		T = K + K * Y - 1
		L = T // X
		if L * X != T:
			L += 1
		print(L + K)
main()


import math
t = int(input())
while t:
	t = t - 1
	(x, y, k) = map(int, input().split())
	xtot = k * (1 + y)
	if (xtot - 1) % (x - 1) == 0:
		tot = (xtot - 1) // (x - 1) + k
	else:
		tot = (xtot - 1) // (x - 1) + k + 1
	print(int(tot))


from sys import stdin
import math
input = stdin.readline
T = int(input())
for t in range(1, T + 1):
	(x, y, k) = map(int, input().split())
	min_stick_needed = y * k + k
	l = 1
	r = min_stick_needed
	ans = 0
	while l <= r:
		mid = (l + r) // 2
		res = mid * x
		res -= mid - 1
		if res >= min_stick_needed:
			ans = mid
			r = mid - 1
		else:
			l = mid + 1
	print(k + ans)


h = int(input())
l = []
for i in range(h):
	(x, y, k) = list(map(int, input().split()))
	n = y * k + k
	if (n - 1) % (x - 1) == 0:
		print((n - 1) // (x - 1) + k)
	else:
		print((n - 1) // (x - 1) + 1 + k)


import random

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

def lcm(a, b):
	return a * b / gcd(a, b)
for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	stickreq = k * y
	if (k + stickreq - 1 + (x - 1) * k) % (x - 1) == 0:
		print((k + stickreq - 1 + (x - 1) * k) // (x - 1))
	else:
		print((k + stickreq - 1 + (x - 1) * k) // (x - 1) + 1)


list_ans = []
for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	list_ans.append((k * y + k - 2) // (x - 1) + 1 + k)
for item in list_ans:
	print(item)


import os
import sys
from io import BytesIO, IOBase
import math
from decimal import *
getcontext().prec = 30
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 binary_search(data, val, le):
	test = le
	if val >= data[-1]:
		return [test - 1, test - 1]
	elif val <= data[0]:
		return [0, 0]
	high_index = test - 1
	low_index = 0
	while high_index > low_index:
		index = (high_index + low_index) // 2
		sub = data[index]
		if data[low_index] == val:
			return [low_index, low_index]
		elif sub == val:
			return [index, index]
		elif data[high_index] == val:
			return [high_index, high_index]
		elif sub > val:
			if high_index == index:
				return sorted([high_index, low_index])
			high_index = index
		else:
			if low_index == index:
				return sorted([high_index, low_index])
			low_index = index
	return sorted([high_index, low_index])
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
for _ in range(int(input())):
	(a, b, c) = map(int, input().split(' '))
	print(int(c + math.ceil(Decimal((c * b + c - 1) / Decimal(a - 1)))))


import math
for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	total = y * k + k
	trade = (total - 1) // (x - 1)
	if (total - 1) % (x - 1) != 0:
		trade += 1
	trade += k
	print(trade)


for _ in range(int(input())):
	[x, y, k] = list(map(int, input().split()))
	sticks = k * y + k
	chances = k + (sticks - 1 + x - 2) // (x - 1)
	print(chances)


import math
t = int(input())
while t:
	t -= 1
	(x, y, k) = map(int, input().split())
	ans = 0
	nn = (y + 1) * k - 1
	ans = (nn + (x - 2)) // (x - 1)
	ans += k
	print(ans)


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, bisect, fractions
from collections import deque, defaultdict, OrderedDict, Counter
from fractions import Fraction
from decimal import Decimal

def main():
	starttime = datetime.datetime.now()
	if os.path.exists('input.txt'):
		sys.stdin = open('input.txt', 'r')
		sys.stdout = open('output.txt', 'w')
	for _ in range(ri()):
		(x, y, k) = ria()
		ans = 1
		if x < k * (y + 1):
			tsn = k * (y + 1) - x
			z = tsn // (x - 1)
			if tsn % (x - 1) != 0:
				z += 1
			ans += z
			nsn = z * (x - 1)
		else:
			nsn = x
		uss = nsn - k
		ans += k
		print(ans)
	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 i in range(t):
	(x, y, k) = map(int, input().split())
	total = k * y + k - 1
	t = x - 1
	ans = total // t
	if ans * (x - 1) != total:
		ans += 1
	ans += k
	print(ans)


import sys
from math import ceil
input = lambda : sys.stdin.readline().rstrip('\r\n')

def solve():
	(x, y, k) = map(int, input().split())
	(p, q) = (y * k + k - 1, x - 1)
	if p % q == 0:
		print(p // q + k)
	else:
		print(p // q + k + 1)
for _ in range(int(input())):
	solve()


for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	t = k
	s = y * k + k
	tem = s
	while tem > x:
		s = tem
		t += s // x
		tem = s // x + s % x
	if tem > 0:
		t += 1
	print(t)


import os
import sys
from math import *
from collections import *
from bisect 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')
ALPHA = 'abcdefghijklmnopqrstuvwxyz'
M = 10 ** 9 + 7
EPS = 1e-06

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()):
	(x, y, n) = value()
	need_stick = y * n + n - 1
	x -= 1
	ans = need_stick // x + int(need_stick % x > 0)
	ans1 = ceil(need_stick / x)
	print(ans + n)


import os
import sys
from io import BytesIO, IOBase

def main():
	T = iin()
	while T:
		T -= 1
		(x, y, k) = lin()
		a = (k * (y + 1) - 1 + x - 2) // (x - 1)
		print(a + k)
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 iin():
	return int(input())

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


for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	res = ((y + 1) * k - 1) // (x - 1) + (((y + 1) * k - 1) % (x - 1) != 0)
	print(res + k)


for _ in range(int(input())):
	(x, y, k) = [int(i) for i in input().split()]
	sum1 = k + y * k - 1
	nd = sum1 // (x - 1)
	if sum1 % (x - 1) != 0:
		nd += 1
	print(nd + k)


from collections import defaultdict
import sys
import math

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

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

def input():
	return sys.stdin.readline().strip()
for _ in range(int(input())):
	(x, y, n) = map(int, input().split())
	req_sticks = n + y * n - 1
	steps = req_sticks // (x - 1)
	remained = req_sticks - steps * (x - 1)
	if remained > 0:
		steps += 1
	print(steps + n)


from decimal import Decimal
import sys, math

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

def list_input():
	return list(map(int, sys.stdin.readline().strip().split()))
for _ in range(int(input())):
	(x, y, k) = multiple_input()
	total = y * k + k - 1
	n = math.ceil(Decimal(total) / Decimal(float(x - 1)))
	print(n + k)


import sys
input = sys.stdin.readline
t = int(input())
for tests in range(t):
	(x, y, k) = map(int, input().split())
	LAST = k + k * y
	ANS = (k + k * y - 1 + (x - 2)) // (x - 1)
	ANS += k
	print(ANS)


from math import ceil, floor
import decimal

def main():
	t = int(input())
	decimal.getcontext().prec = 19
	decimal.getcontext().rounding = decimal.ROUND_DOWN
	for _ in range(t):
		(x, y, k) = map(int, input().split())
		r = (y * k + k - 1 + (x - 2)) // (x - 1) + k
		print(r)
main()


t = int(input())
for i in range(t):
	(x, y, n) = map(int, input().split())
	a = n - 1 + n * y
	s = n + a // (x - 1)
	z = a // (x - 1)
	if z * (x - 1) < a:
		s = s + 1
	print(s)


t = int(input())
while t:
	user_input = list(map(int, input().split()))
	solution = user_input[2]
	target = user_input[2] + user_input[1] * user_input[2]
	while target > user_input[0]:
		temp = target // user_input[0]
		rem = target % user_input[0]
		target = temp + rem
		solution += temp
	print(solution + 1)
	t -= 1


def buy():
	(x, y, k) = list(map(int, input().split()))
	st = k + k * y - 1
	if st % (x - 1) != 0:
		return st // (x - 1) + k + 1
	return st // (x - 1) + k
for _ in range(int(input())):
	print(buy())


import sys
input = lambda : sys.stdin.readline().rstrip()
T = int(input())
for _ in range(T):
	(x, y, k) = map(int, input().split())
	n = k * y + k
	print(k - (1 - n) // (x - 1))


from math import ceil
t = int(input())
answer = []
for _ in range(t):
	(x, y, k) = map(int, input().split(' '))
	n = ((y + 1) * k - 1) // (x - 1) + (((y + 1) * k - 1) % (x - 1) != 0)
	answer.append(str(n + k))
print('\n'.join(answer))


t = int(input())
for _ in range(t):
	(x, y, n) = map(int, input().split())
	l = 0
	r = 100000000000000000000
	while l < r:
		mid = l + r >> 1
		if x + mid * (x - 1) < n * (y + 1):
			l = mid + 1
		else:
			r = mid
	print(l + n + 1)


t = int(input())
for i in range(t):
	(x, y, n) = list(map(int, input().split()))
	ncoal = n * y
	nsticks = n * y + n - x
	ntrade = nsticks // (x - 1)
	lefts = nsticks % (x - 1)
	if lefts == 0:
		print(ntrade + 1 + n)
	else:
		print(ntrade + 2 + n)


from math import ceil

def main():
	t = int(input())
	for i in range(t):
		(x, y, k) = map(int, input().split())
		answer = (k * (y + 1) - 1) // (x - 1)
		if answer * (x - 1) + 1 < k * (y + 1):
			answer += 1
		print(answer + k)
main()


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

def main():
	pass
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 binary(n):
	return bin(n).replace('0b', '')

def decimal(s):
	return int(s, 2)

def pow2(n):
	p = 0
	while n > 1:
		n //= 2
		p += 1
	return p

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(int(n))
	return l

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

def maxPrimeFactors(n):
	maxPrime = -1
	while n % 2 == 0:
		maxPrime = 2
		n >>= 1
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			maxPrime = i
			n = n / i
	if n > 2:
		maxPrime = n
	return int(maxPrime)
for xyz in range(0, int(input())):
	(x, y, k) = map(int, input().split())
	r = y * k + k - 1
	print((r + x - 2) // (x - 1) + k)


import math
for _ in range(int(input())):
	(x, y, k) = [int(x) for x in input().split()]
	mt = (y * k + k - 1) // (x - 1) + k + ((y * k + k - 1) % (x - 1) > 0)
	print(mt)


t = int(input())
for i in range(t):
	(x, y, k) = map(int, input().split())
	ans = k * y
	ans += k + x - 3
	ans //= x - 1
	ans += k
	print(ans)


for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	total = y * k + k
	temp = (total - 1) // (x - 1)
	if temp * (x - 1) + 1 < total:
		temp += 1
	print(temp + k)


from sys import stdin, stdout
import math, sys
from itertools import permutations, combinations
from collections import defaultdict, deque, OrderedDict, Counter
from os import path
import bisect as bi
import heapq
mod = 10 ** 9 + 7

def yes():
	print('YES')

def no():
	print('NO')
if path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

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

	def minp():
		return map(int, input().split())
else:

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

	def minp():
		return map(int, stdin.readline().split())
for _ in range(inp()):
	(x, y, k) = minp()
	print(k - (1 - y * k - k) // (x - 1))


from sys import stdin
input = stdin.readline

def gt():
	return list(map(int, input().split()))
(t,) = gt()
while t:
	t -= 1
	(x, y, k) = gt()
	x -= 1
	ans = (k * (y + 1) - 1 + x - 1) // x + k
	print(ans)


import math
t = int(input())
for _ in range(t):
	(x, y, k) = map(int, input().split())
	ans = -1
	(lo, hi) = (0, int(3e+18))

	def can(mid):
		sticks = 1
		sticks += (x - 1) * mid
		return sticks >= k + y * k
	while lo <= hi:
		mid = (lo + hi) // 2
		if can(mid):
			ans = mid
			hi = mid - 1
		else:
			lo = mid + 1
	print(ans + k)


from sys import stdin
input = lambda : stdin.readline().strip()
lin = lambda : list(map(int, input().split()))
iin = lambda : int(input())
main = lambda : map(int, input().split())
from math import ceil, sqrt, factorial, log
from collections import deque
from bisect import bisect_left

def gcd(a, b):
	(a, b) = (max(a, b), min(a, b))
	while a % b != 0:
		(a, b) = (b, a % b)
	return b

def solve():
	(x, y, k) = main()
	z = (k * y + k - 1) // (x - 1)
	t = k * y + k
	if t <= z * x - z + 1:
		print(z + k)
	else:
		print(z + k + 1)
qwe = 1
qwe = int(input())
for _ in range(qwe):
	solve()


t = int(input())

def bisect(x, y, k):
	l = -1
	r = 10 ** 27
	while r - l > 1:
		n = (r + l) // 2
		if 1 + n * (x - 1) - y * k >= k:
			r = n
		else:
			l = n
	return r
for i in range(t):
	(x, y, k) = list(map(int, input().split()))
	n = bisect(x, y, k)
	print(n + k)


t = int(input())
for i in range(t):
	(x, y, k) = input().split(' ')
	(x, y, k) = (int(x), int(y), int(k))
	first = ((y + 1) * k - 1 + x - 2) // (x - 1)
	second = k
	print(first + second)


t = int(input())
for i in range(t):
	(x, y, k) = map(int, input().split(' '))
	required_sticks = k + k * y
	trade_up = (required_sticks - 1) // (x - 1)
	total_trades = trade_up + ((required_sticks - 1) % (x - 1) > 0)
	print(total_trades + k)


import math
for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	tot = k * y + k - 1
	print((tot + x - 2) // (x - 1) + k)


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')
import math
from decimal import *
getcontext().prec = 25
t = int(input())
for _ in range(t):
	(x, y, k) = list(map(int, input().rstrip().split(' ')))
	z = math.ceil(Decimal(k - 1 + k * y) / Decimal(x - 1))
	print(z + k)


for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	ans = k
	p = (y * k + k - 1 + x - 2) // (x - 1)
	ans += p
	print(ans)


for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	sn = k * y + k
	sh = 1
	ans = k + (sn - sh) // (x - 1)
	if (sn - sh) % (x - 1) != 0:
		ans += 1
	print(ans)


import math
for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	total = k + k * y - 1
	x = (total - 1) // (x - 1) + 1
	print(math.floor(x) + k)


import os

def f(x, y, k):
	steps = 0
	cost = k * (1 + y)
	net_benefit = x - 1
	stick_trades = (cost - 1) // net_benefit + ((cost - 1) % net_benefit != 0)
	coal_trades = k
	steps = stick_trades + coal_trades
	return steps
t = int(input())
for testcase in range(t):
	(x, y, k) = [int(x) for x in input().split()]
	print(f(x, y, k))


import sys
input = sys.stdin.buffer.readline

def solution():
	(x, y, k) = map(int, input().split())
	d = k * (y + 1)
	if (d - 1) % (x - 1) == 0:
		ans = (d - 1) // (x - 1)
	else:
		ans = (d - 1) // (x - 1) + 1
	print(ans + k)
t = int(input())
for _ in range(t):
	solution()


for _ in range(int(input())):
	(x, y, k) = map(int, input().split())
	ans = (k * (y + 1) - 1) // (x - 1)
	c = (k * (y + 1) - 1) % (x - 1)
	if c:
		ans += 1
	print(ans + k)


from sys import stdin, stdout
import math
import heapq
import collections
input = stdin.readline

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 inputstrings():
	return [x for x in input().split()]

def inputstringnum():
	return [ord(x) - ord('a') 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
t = int(input())
for q in range(t):
	(x, y, k) = inputnums()
	a = k * y + k - 1
	if a % (x - 1) == 0:
		a = a // (x - 1) + k
	else:
		a = a // (x - 1) + k + 1
	print(a)


t = int(input())
for _ in range(t):
	(x, y, k) = [int(n) for n in input().split()]
	m = k * (y + 1) - 1
	print(-(-m // (x - 1)) + k)


import math
s = int(input())
for _ in range(s):
	n = list(map(int, input().split()))
	i = math.ceil((n[1] * n[2] - n[0]) / (n[0] - 1))
	j = n[0] + (n[0] - 1) * i - n[2] * n[1]
	k = math.ceil((n[2] - j) / (n[0] - 1))
	print(1 + i + n[2] + k)


for i in range(int(input())):
	(a, b, c) = map(int, input().split())
	print(c + (c * b + c - 2) // (a - 1) + 1)