Base Case
if ( N == 1 ) : NEW_LINE INDENT print ( 10 ) ; NEW_LINE return ; NEW_LINE DEDENT dp = [ [ 0 for i in range ( 10 ) ] for j in range ( N ) ] NEW_LINE for i in range ( 1 , 10 ) : NEW_LINE INDENT dp [ 0 ] [ i ] = 1 ; NEW_LINE DEDENT for i in range ( 1 , N ) : NEW_LINE