Fixed the num variable to be in range [1,111]