#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int a, b, c, operations = 0, sum = 0;
    cin >> a >> b >> c;
    while (sum <= c) {
      if (a > b) {
        b = a + b;
        sum = b;
      } else {
        a = a + b;
        sum = a;
      }
      operations++;
    }
    cout << operations << endl;
  }
  return 0;
}
