Nothing is output in python recursive function
I'm working on a code that calculates the 'distance' between two configurations of a Flip Cube, The distance between two configurations x and y is the minimum number of steps required to go from x to y, or conversely. To make that I've created a simpler version that makes something different, this code takes two integer numbers ci and cf. with ci returns an iterable called main_level through the generator called multi, then, it iterates through it searching for the parameter cf, whenever cf is not in main_level the variable steps is increased by 1 and for each element in main_level we repeat the same process done for ci. Finally, when cii==cf the program ends and returns the steps variable, which counts the number of "levels" that we have to go down to find the given parameter cf. This code doesn't have any practical purpose is just a base for the problem I mentioned above. If I call the distance(ci, cf) function with ci=5, the first two levels are: {0,3,6,9,12} <-- first level (steps is initialized with 1) if cf is any of the numbers in the set, the program should end and return steps=1 if cf is not in that set, the programs form the second level: {15,18,21,24,27,30,33} and search cf if cf is there, the program ends and should return steps=2, if not, it forms the third level, and so on. But there is a problem, actually, when I call the distance function with ci=5 and cf= any natural number, and print its value, anything is output, only for cf=0, it outputs step=1. I don't really know what's going on. I would appreciate your help. Here is the code: https://code.sololearn.com/cMacM2x66JD6