The volume of a right circular cone varies jointly as the altitude and the square of the radius of the base. If the volume of the cone is 154 cu. in. when its altitude is 12 in. and the radius of the base is 3 1/2 in., find the altitude when the volume of the cone is 77 cu. in. and the radius of the base is in.