A group of soldiers are marching in ranks while holding flags.
There are soldiers marching in formation.
If soldiers are marching in ranks it is already implied that they are marching in formation.
exists e1 e2 x1 x2 x3 x4.(while(e1,e2) & Theme(e2,x4) & Actor(e2,x1) & v_hold(e2) & n_flag(x4) & in(e1,x3) & n_rank(x3) & Actor(e1,x1) & v_march(e1) & of(x1,x2) & n_soldier(x2) & n_group(x1))
exists p1 x1 e1 x2 x3 x4.((x1 = x2) & in(e1,x4) & n_formation(x4) & Actor(e1,x3) & v_march(e1) & (x2 = x3) & n_soldier(x2))