Handle the base cases
x1 = " " NEW_LINE y1 = " " NEW_LINE for i in range ( 0 , Y ) : NEW_LINE INDENT x1 += ' b ' NEW_LINE DEDENT for i in range ( 0 , X ) : NEW_LINE INDENT y1 += ' a ' NEW_LINE DEDENT if ( X == 0 ) : NEW_LINE INDENT return x1 NEW_LINE DEDENT if ( Y == 0 ) : NEW_LINE INDENT return y1 NEW_LINE DEDENT