Each person will check which line has the least people, and if there are multiple, will choose a random line with the least amount of people. It ends when each line is full.
thanks to the music i was listening to while i made this i guess All code by me