I am looking for a book that I read in middle school (late 1990's). I am not sure if that was when it was written however.
What I remember is the book starts out with a group of kids graduating school. Some kids who have family members with jobs get to go with them. Other kids get sent to something like a ghetto. This causes a group of friends to get split up. The kids in the ghetto struggle to survive. Somehow they are mysteriously chosen for a quest. It is determined (I think without any of the kids' knowledge) that the group needs the help of their friends who went to families. One of the kids who then gets sent to the ghetto is really upset about this. I specifically remember a scene where they are scavenging for a mattress for the new kid. They find one in really good shape but it has a urine stain. He refuses to take it and the others state how they wished they had found one so good when looking for themselves.
I am not certain but I think that they may have ridden a train to a mountain concerning their task.