#include <iostream>
using namespace std;
int main()
{
int i,j,ca,temp,max,count;
while(cin>>i>>j)
{
cout<<i<<" "<<j<<" ";
if(i>j)
{ temp=i;i=j;j=temp;}
max=0;
for(ca=i;ca<=j;ca++)
{
temp=ca;
count=0;
while(temp!=1)
{
if(temp%2==1)
{
temp=temp*3+1;
}
else
temp/=2;
count++;
}
if(count>max)
max=count;
}
max++;
cout<<max<<endl;
}
return 0;
}