Find how many "D", "C", "B" and "A" grades the students have got after the last Computer Science test. There are n students in the class. The program gets the n number as input and then gets the grades one by one. The program should output four numbers in a single line, representing the number of grades equal to "D", "C", "B" and "A".
Numbers represent the following grades: 2 is "D", 3 is "C", 4 is "B", and 5 is "A".