#include <cstdio>
int main()
{
bool swapped;
unsigned val, min, max, counter, maxcounter;
while ( scanf("%u %u", &min, &max) == 2 )
{
swapped = false;
if (min > max)
{
swapped = true;
unsigned tmp = min;
min = max;
max = tmp;
}
maxcounter = 1;
for ( unsigned i = min; i <= max; ++i )
{
for ( counter = 1, val = i; val != 1; ++counter )
{
if ( val & 1 )
val = 3 * val + 1;
else
val >>= 1;
}
if ( counter > maxcounter )
maxcounter = counter;
}
if ( !swapped )
printf("%u %u %u\n", min, max, maxcounter);
else
printf("%u %u %u\n", max, min, maxcounter);
}
return 0;
}