Two by two

One person beside or next to another person.

The children walked into the classroom two by two.