If current substring is present in all strings and its length is greater than current result
if ( k + 1 == n and len ( res ) < len ( stem ) ) : NEW_LINE INDENT res = stem NEW_LINE DEDENT return res NEW_LINE