The first group is a third of the class which is (1/3)*45 = <<1/3*45=15>>15 students
There are 15 students in the first group, so there are 45-15 = <<45-15=30>>30 students
The second group is two-fifths of the class which is (2/5)*45 = <<2/5*45=18>>18 students
There are 18 in the second group so there are 30-18 = <<30-18=12>>12 students left in the third group
#### 12