If you look up relative pronoun on Wikipedia you'll see an explanation of "which". Being a pronoun it refers back to an antecedent. In your sentence there are only two antecedents that "which" can refer to:
or the noun phrase
"each of you"
The fact that there are two possible antecedents that "which" can refer to doesn't of itself make it ambiguous. Take the usage note for "which" in the American Heritage Dictionary:
"They swept the council elections, which could never have happened
under the old rules." More than 80 percent of the Usage Panel approved
both of these examples in our 2009 survey.
What is it that couldn't have happened under the old rules? The council elections? Or the sweeping of the council elections. There are obviously two possible antecedents here, though it was approved by 80% of the usage panel.
In your example it's quite clear what the pronoun refers to (though it could be written better in my opinion). The antecedent the pronoun refers to is "class".
Does it make sense to receive an 'A' grade for a class? Of course it does. In other words a bunch of people were selected to participate in a class for which they will receive an 'A' grade."
If there's confusion about the expressions "to which", "at which", "for which" etc., try and read it in the more casual/informal version which ends the sentence with the preposition.
"This is the type of thing for which I live."
"This is the type of
thing I live for."
"This is a class for which you will receive an 'A'."
"This is a
class you'll receive an 'A' for."