#include 
#include 

using namespace std;

int main (int argc, char * const argv[]) {
	cout << "\nEnter the name of the file you want to open: ";
    char FileName[20];
	cin >> FileName;
	ifstream Students(FileName);
	char name[30];
	int form;
	char letter;
	int counter[12*5]; // 12 forms, 5 letters (a,b,c,d,e)
	while ((Students>>name)&&(Students>>form)&&(Students>>letter)) {
		counter[form-1+12*((int)letter-(int)'a')]++;
	}
	for(int i=1; i<=12*5; i++)
	if(counter[i]>5){
		cout<<"Form: "<<(i%12+1)<<"-"<<(char)(i/12+'a')<<"\n";
	}
    return 0;
}