#include<stdio.h>
int main()
{
	int a,b;
	int n,m;
	int sum,count;
       int i;
	while(scanf("%d%d",&m,&n)!=EOF)
	{
		if(m>n)
		{
			a=n;
			b=m;
		}
		else
		{a=m;
		b=n;
		}
		sum=0;
		for(;a<=b;a++)
		{
			i=a;
			count=0;
			while(i!=1)
			{
				if(i%2==0)
				{
					count++;
					i=i/2;
				}
				else 
				{
					count++;
					i=i*3+1;
				}
			
			}
			count++;
			if(sum<count)sum=count;
		}
		printf("%d %d %d\n",m,n,sum);
		sum=0;
	}
	return 0;
}