#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  for (int test = 0; test < t; test++) {
    int a;
    int b;
    cin >> a >> b;
    int n;
    cin >> n;
    int counter = 0;
    while (max(a, b) <= n) {
      if (b < a) {
        b += a;
      } else {
        a += b;
      }
      counter++;
    }
    cout << counter << endl;
  }
}
