the solution of the Flags