The exact passwords are easy to forget, but the way to get them is straightforward: after you defeat the Team Rocket members in a Pokemon battle, you can ask them for the passwords. That is how you obtain the codes needed to get into the warehouse, so battle the grunts first and then hear them out.