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.
import java.util.*;
import java.io.*;

 public class Task{
// taking inputs
static BufferedReader s1;
static BufferedWriter out;
static String read() throws IOException{String line="";while(line.length()==0){line=s1.readLine();continue;}return line;}
static int int_v (String s1){return Integer.parseInt(s1);}
static long long_v(String s1){return Long.parseLong(s1);}
static int[] int_arr() throws IOException{String[] a=read().split(" ");int[] b=new int[a.length];for(int i=0;i<a.length;i++){b[i]=int_v(a[i]);}return b;}
static long[] long_arr() throws IOException{String[] a=read().split(" ");long[] b=new long[a.length];for(int i=0;i<a.length;i++){b[i]=long_v(a[i]);}return b;}
static void assign(){s1=new BufferedReader(new InputStreamReader(System.in));out=new BufferedWriter(new OutputStreamWriter(System.out));}

//......................................@uthor_Alx..............................................
 static long rec(long a, long b, long n,long res) throws IOException{
 	if(Math.max(a,b)>n){return res;}
 	return rec(a+b,Math.max(a,b),n,res+1l);
 }
   public static void main(String[] args) throws  IOException{
	        		  assign();
	        		  	int t=int_v(read());
	        		  	while(t--!=0){
	        		  		long[] x=long_arr();
	        		  		long a=x[0],b=x[1],n=x[2];
	        		  		a=Math.max(a,b);b=Math.min(x[0],x[1]);
	        		  		
	        		  		long res=rec(a,b,n,0l);
	        		  		out.write(res+"\n");
	        		  		/*String s="codeforces";
	        		  		long k=long_v(read());
	        		  		long k1=1;
	        		  		int pp=(int)Math.pow(k,0.1);
	        		  		for(int i=0;i<9;i++){
	        		  			for(int j=1;j<=pp;j++){
	        		  				out.write(s.charAt(i));
	        		  			}
	        		  			k1*=(long)pp;
	        		  		}

	        		  		for(int j=1;j<=k/k1;j++){
	        		  				out.write(s.charAt(9));
	        		  			}
	        		  			out.write("\n");
	        		  			out.write(k1+" ");*/
	        		  		//out.write(pp+"\n");

	        		  	}
                      out.flush();
	        		 
	}
}
	       