#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  cin.ignore();
  while (t--) {
    int a, b, n;
    cin >> a >> b >> n;
    int sum = a + b;
    int min = a > b ? a : b;
    int temp, count = 1;
    while (sum <= n) {
      temp = sum;
      sum = sum + min;
      min = temp;
      count++;
    }
    cout << count << endl;
  }
  return 0;
}
