#include <stdio.h>
#include <stdlib.h>
int main()
{
int m, n;
scanf("%d%d", &m, &n);
int** scores = (int**)malloc(m * sizeof(int*));
int i, j;
for (i = 0; i < m; i++) {
scores[i] = (int*)malloc(n * sizeof(int));
}
for (i = 0; i < m; i++)
{
for (j = 0; j < n; j++)
{
scanf("%d", &scores[i][j]);
}
}
int maxscore = 0, maxclass = 0, maxstudent = 0;
for (i = 0; i < m; i++)
{
for (j = 0; j < n; j++)
{
if (scores[i][j] > maxscore)
{
maxscore = scores[i][j];
maxclass = i + 1;
maxstudent = j + 1;
}
}
}
printf("top=%d\n", maxscore);
for (i = 0; i < m; i++) {
for (j = 0; j < n; j++) {
if (scores[i][j] == maxscore) {
printf("Class %d, No %d\n", i + 1, j + 1);
}
}
}
for (i = 0; i < m; i++)
{
free(scores[i]);
}
free(scores);
return 0;
}