Step 2 : Getting rid of 0 , as 0 is not part of number system
for j in range ( 0 , i - 1 ) : NEW_LINE INDENT if ( arr [ j ] <= 0 ) : NEW_LINE INDENT arr [ j ] += 26 NEW_LINE arr [ j + 1 ] = arr [ j + 1 ] - 1 NEW_LINE DEDENT DEDENT for j in range ( i , - 1 , - 1 ) : NEW_LINE INDENT if ( arr [ j ] > 0 ) : NEW_LINE INDENT print ( chr ( ord ( ' A ' ) + ( arr [ j ] - 1 ) ) , end = " " ) ; NEW_LINE DEDENT DEDENT print ( ) ; NEW_LINE