Fix integers
r
,
s
1
,
…
,
s
l
r,s_{1},\dots ,s_{l}
such that
1
≤
l
≤
r
−
1
1\leq l\leq r-1
and
s
l
≥
r
−
l
+
1
s_{l}\geq r-l+1
, and let
C
(
r
;
s
1
,
…
,
s
l
)
\mathcal {C}(r;s_{1},\dots ,s_{l})
be the set of all integral, projective and nondegenerate curves
C
C
of degree
s
1
s_{1}
in the projective space
P
r
\mathbf {P}^{r}
, such that, for all
i
=
2
,
…
,
l
i=2,\dots ,l
,
C
C
does not lie on any integral, projective and nondegenerate variety of dimension
i
i
and degree
>
s
i
>s_{i}
. We say that a curve
C
C
satisfies the flag condition
(
r
;
s
1
,
…
,
s
l
)
(r;s_{1},\dots ,s_{l})
if
C
C
belongs to
C
(
r
;
s
1
,
…
,
s
l
)
\mathcal {C}(r;s_{1},\dots ,s_{l})
. Define
G
(
r
;
s
1
,
…
,
s
l
)
=
max
{
p
a
(
C
)
:
C
∈
C
(
r
;
s
1
,
…
,
s
l
)
}
,
G(r;s_{1},\dots ,s_{l})=\operatorname {max}\left \{p_{a}(C):\,C\in \mathcal {C}(r;s_{1},\dots ,s_{l})\right \},
where
p
a
(
C
)
p_{a}(C)
denotes the arithmetic genus of
C
C
. In the present paper, under the hypothesis
s
1
≫
⋯
≫
s
l
s_{1}\gg \dots \gg s_{l}
, we prove that a curve
C
C
satisfying the flag condition
(
r
;
s
1
,
…
,
s
l
)
(r;s_{1},\dots ,s_{l})
and of maximal arithmetic genus
p
a
(
C
)
=
G
(
r
;
s
1
,
…
,
s
l
)
p_{a}(C)=G(r;s_{1},\dots ,s_{l})
must lie on a unique flag such as
C
=
V
s
1
1
⊂
V
s
2
2
⊂
⋯
⊂
V
s
l
l
⊂
P
r
C=V_{s_{1}}^{1}\subset V_{s_{2}}^{2}\subset \dots \subset V_{s_{l}}^{l}\subset {\mathbf {P}^{r}}
, where, for any
i
=
1
,
…
,
l
i=1,\dots ,l
,
V
s
i
i
V_{s_{i}}^{i}
denotes an integral projective subvariety of
P
r
{\mathbf {P}^{r}}
of degree
s
i
s_{i}
and dimension
i
i
, such that its general linear curve section satisfies the flag condition
(
r
−
i
+
1
;
s
i
,
…
,
s
l
)
(r-i+1;s_{i},\dots ,s_{l})
and has maximal arithmetic genus
G
(
r
−
i
+
1
;
s
i
,
…
,
s
l
)
G(r-i+1;s_{i},\dots ,s_{l})
. This proves the existence of a sort of a hierarchical structure of the family of curves with maximal genus verifying flag conditions.