Leo has developed a new programming language C+=. In C+=, integer variables can only be changed with a "+=" operation that adds the right-hand side value to the left-hand side variable. For example, performing "a += b" when a = $2$, b = $3$ changes the value of a to $5$ (the value of b does not change).

In a prototype program Leo has two integer variables a and b, initialized with some positive values. He can perform any number of operations "a += b" or "b += a". Leo wants to test handling large integers, so he wants to make the value of either a or b strictly greater than a given value $n$. What is the smallest number of operations he has to perform?


-----Input-----

The first line contains a single integer $T$ ($1 \leq T \leq 100$) — the number of test cases.

Each of the following $T$ lines describes a single test case, and contains three integers $a, b, n$ ($1 \leq a, b \leq n \leq 10^9$) — initial values of a and b, and the value one of the variables has to exceed, respectively.


-----Output-----

For each test case print a single integer — the smallest number of operations needed. Separate answers with line breaks.


-----Example-----
Input
2
1 2 3
5 4 100

Output
2
7



-----Note-----

In the first case we cannot make a variable exceed $3$ in one operation. One way of achieving this in two operations is to perform "b += a" twice.

Difficulty: interview

Starter code:

Solutions:
from sys import stdin
input = stdin.readline
q = int(input())
for _ in range(q):
    a,b,n = map(int,input().split())
    kroki = 0
    while max(a,b) <= n:
        if a > b:
            a,b = b,a
        a = a+b
        kroki += 1
    print(kroki)

for _ in range(int(input())):
    a, b, n = list(map(int, input().split()))
    ans = 0
    a, b = min(a,b), max(a,b)
    while b <= n:
        a, b = b, a+b
        ans += 1
    print(ans)


for _ in range(int(input())):
    a, b, n = list(map(int, input().split()))
    # n = int(input())
    # arr = list(map(int, input().split()))
    if a < b:
        a, b = b, a
    cnt = 0
    while a <= n:
        cnt += 1
        a, b = a + b, a
    print(cnt)



for _ in range(int(input())):
    a,b,n=map(int,input().split())
    ans=0
    while a<=n and b<=n:
        if a>b:b+=a
        else:a+=b
        ans+=1
    print(ans)

for _ in range(int(input())):
    a, b, n = list(map(int, input().split()))
    i = 0
    while a <= n and b <= n:
        if a < b: a, b = b, a
        b += a
        i += 1 
    print(i)


import sys
inputr = lambda: sys.stdin.readline().rstrip('\n')
input = sys.stdin.readline

INF = 10 ** 18

for _ in range(int(input())):
	a, b, n = list(map(int, input().split()))

	r = 0
	while a <= n and b <= n:
		r += 1
		if a > b:
			b += a
		else:
			a += b

	print(r)


t = int(input())
for _ in range(t):
    a, b, n = list(map(int, input().split()))
    ans = 0
    while a <= n and b <= n:
        ans += 1
        if a <= b:
            a += b
        else:
            b += a
    print(ans)


T = int(input())
for _ in range(T):
    a,b,n = [int(i) for i in input().split()]
    c = 0
    while a <= n and b <= n:
        if a > b:
            b += a
        else:
            a += b
        c += 1
    print(c)

#list(map(int,input().split()))
t=int(input())
for _ in range(t):
    a,b,n=list(map(int,input().split()))
    tot=0
    while(max(a,b)<=n):
        tot+=1
        if(a<b):
            a+=b
        else:
            b+=a
    print(tot)
        
    


from collections import defaultdict as dd
from collections import deque
import bisect
import heapq

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

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


def solve():
    a, b, n = rl()
    steps = 0
    while max(a, b) <= n:
        steps += 1
        if a <= b:
            a = a + b
        else:
            b = a + b
    print (steps)






mode = 'T'

if mode == 'T':
    t = ri()
    for i in range(t):
        solve()
else:
    solve()




for _ in range(int(input())):
	a,b,n=list(map(int,input().split()))

	ans=0

	while(max(a,b)<=n):
		a,b=max(a,b),min(a,b)
		ans+=1
		b+=a

	print(ans)



from collections import Counter, defaultdict

BS="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
def to_base(s, b):
    res = ""
    while s:
        res+=BS[s%b]
        s//= b
    return res[::-1] or "0"
alpha = "abcdefghijklmnopqrstuvwxyz"
from math import floor, ceil,pi

import re

pattern = r"0+"

t = int(input())
for i in range(t):
    a,b,n = list(map(int, input().split()))
    c = 0
    while a <= n and b <= n:
        c += 1
        if a < b:
            a += b
        else:
            b += a
    print(c)

from math import *
from random import *
for t in range(int(input())):
    a, b, n = map(int, input().split())
    otv = 0
    while a <= n and b <= n:
        if a > b:
            b += a
        else:
            a += b
        otv += 1
    print(otv)

import sys
import random
from math import *
 
def input():
    return sys.stdin.readline().strip()
 
def iinput():
    return int(input())

def finput():
    return float(input())

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

def linput():
    return list(input())
 
def rinput():
    return map(int, tinput())

def fiinput():
    return map(float, tinput())
 
def rlinput():
    return list(map(int, input().split()))
def trinput():
    return tuple(rinput())

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

def YESNO(fl):
    if fl:
        print("NO")
    else:
        print("YES")
    
    
def main(): 
    #n = iinput() 
    #k = iinput() 
    #m = iinput() 
    #n = int(sys.stdin.readline().strip()) 
    #n, k = rinput()
    #n, m = rinput()
    #m, k = rinput()
    #n, k, m = rinput()
    #n, m, k = rinput()
    #k, n, m = rinput()
    #k, m, n = rinput() 
    #m, k, n = rinput()
    #m, n, k = rinput()
    #q = srlinput()
    #q = linput()
    a, b, n = rinput()
    g = 0
    a, b = sorted([a, b])
    while b <= n:
        a += b
        g += 1
        if a > n:
            break
        b += a
        g+= 1
    print(g)
    
    

    
    
            
            
    
    
    
    
for inytd in range(int(input())):
    main()

import sys
input = sys.stdin.readline

t=int(input())
for tests in range(t):
    a,b,n=list(map(int,input().split()))
    ANS=0

    while a<=n and b<=n:
        if a<b:
            a+=b
        else:
            b+=a
        ANS+=1
    print(ANS)


n = int(input())
for i in range(n):
	a, b, n = list(map(int, input().split()))
	t = 0
	while a <= n and b <= n:
		if a <= b:
			a += b
		else:
			b += a
		t += 1
	print(t)

t = int(input())
for _ in range(t):
    a, b, n = list(map(int, input().split()))
    ans = 0
    while max(a, b) <= n:
        a, b = a + b, max(a, b)
        ans += 1
    print(ans)


for _ in range(int(input())):
    a, b, n = map(int, input().split())
    cnt = 0
    while a <= n or b <= n:
        if a > b:
            b += a
        else:
            a += b
        cnt += 1
    print(cnt-1)

T = int(input())
for test in range(T):
    a, b, n = list(map(int, input().split(" ")))
    res = 0
    while a<=n and b<=n:
        res+=1
        if a<b:
            a+=b
        else:
            b+=a
    print(res)