During holidays, anniversaries, ceremonies, etc., as a sign of celebration, warships can display a line of flags (for example, signal flags) strung up from the stemhead to the masthead, continuing all the way to the taffrail.
(From Wikipedia)
Full-Dress Ships
Also known as "Dressing Overall"The impression that it makes is quite amazingThe naval ensign or the commander's flag should be placed on each mastheadWhen there are a lot of ships in a photo, the effect is very interesting and exciting