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 ≤ T ≤ 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 ≤ a, b ≤ n ≤ 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.
#!/bin/python3

import math
import os
import random
import re
import sys
from collections import defaultdict


# def getMapCount(mapping, key):
#     if key in mapping:
#         return mapping[key]
#     else:
#         return 0

# def binSearch(arr, item):
#     low, hi = 0, len(arr) - 1
#     mid = (low + hi) // 2
#     while low <= hi:
#         if arr[mid] < item:
#             low = mid + 1
#         else:
#             hi = mid -1 
#             ans = mid
#         mid = (low + hi )// 2
    
#     return len(arr) - ans 



# def binarySearch (arr, item): 
#     low, hi = 0, len(arr) - 1
    
#     while low <= hi:
#         mid = (low + hi) // 2

#         if arr[mid] == x: 
#             return mid 
        
#          if arr[mid] < item:
#             low = mid + 1
#         else:
#             hi = mid -1 
#     return -1

  

# # print(binSearch([1,2,4,5,9,11,13,99,100], 8))
# def countTriplets(arr, r):
#     # arr = sorted(arr)
#     countMap = dict()
#     index = 0
#     for item in arr:
#         if item not in countMap:
#             countMap[item] = [index]

#         else:
#             countMap[item].append(index)

#         index += 1

#     count = 0
#     print(countMap)
#     indx  = 0
#     for key in countMap:
#         for indx in countMap[key]:
#             if r == 1:
#                 count += (countMap[key] * (countMap[key] - 1) * (countMap[key] - 2)) // 6
#             else:
#                 count += countMap[key] * getMapCount(countMap, indx, key * r) * getMapCount(countMap, key * r * r)
#         indx += 1

#     return count

fib_ara = [1,1]
def fib():
    while fib_ara[-1] < 10**9:
        fib_ara.append(fib_ara[-1] + fib_ara[-2])

fib()

case = int(input())

for i in range(case):
    a = [int(x) for x in  input().split() ]
    a,b, n = a[0] , a[1], a[2]
    small = min(a,b)
    large = max(a,b)
    for j in range(1,len(fib_ara)) :
        if fib_ara[j] * large + fib_ara[j-1] * small > n:
            print(j)
            break