Artistic swimming is a unique sport - and that includes the way artistic swimmers get ready for competition!
We use gelatine (normally used to make jelly) mixed with hot water to make a smooth paste that gets painted on the hair. The reason we use gelatine is because normal water proof gel is not as water proof as we need it to be!
The fun aspect of artistic swimming is being able to dress up and present the theme of your routine. This includes hair and make up. Like dancers or gymnasts would style their hair a particular way, artistic swimmers do the same.
It is not compulsory to use gelatine, you can swim with a regular swim cap, but many teams prefer the look and feel of gelatine. The worst thing is having to worry about a swim cap slipping off your head while you are upside down, out of breath, and trying to perform what you have worked for all year.
Gelatine is more secure as it dries hard and keeps the hair in place. Once it gets wet, it starts to soften again, so it doesn't last forever, but it lasts long enough that swimmers don't need to worry about their hair while they swim a routine (usually - like anything there are sometimes mishaps).
Often swimmers and parents make "head pieces" that get pinned into the hair for extra aesthetic appeal. The pins secure it in, but the gelatine helps to stick it to the hair and not move.
Finally - gelatine can actually be good for your hair! It is similar to a protein mask for the hair, and some swimmers find that after a competition or showcase, their hair feels smoother than normal. The one important thing is to make sure you wash your gelatine out as soon as possible after you finish your routine swim.
It's easier to wash gelatine out when it's already soft from your routine swim. If you wait too long, it becomes hard again and will need longer time in the shower. Also comb your hair as you wash the gelatine out to get the little bits that might be stuck to the scalp quite well - normally by the ears and front of the head.
We hope this answers your question of: what do artistic swimmers put in their hair?