#include<cstdio>
#include<cstring>
#include<iostream>
using namespace std;
int solve(int i, int cnt) {
if (i == 1)
return cnt;
else if (i % 2)
return solve(3 * i + 1, cnt + 1);
else
return solve(i >> 1, cnt + 1);
}
int main() {
int min, max, ans, tans;
while (scanf("%d%d", &min, &max) != EOF) {
ans = 0;
printf("%d %d ", min, max);
if (max < min) //注意第一个输出的数可能大于第二个输入的数
swap(min, max);
for (int i = min; i <= max; i++) {
tans = solve(i, 1);
if (tans > ans)
ans = tans;
}
printf("%d\n", ans);
}
}