On n-maximal subalgebras of Lie algebras