import java.io.*;
import java.util.*;
class Main {
public Main() throws IOException
{
BufferedReader f = new BufferedReader(new InputStreamReader(System.in));
PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
StringTokenizer st = new StringTokenizer(f.readLine());
int n = Integer.parseInt(st.nextToken());
int m = Integer.parseInt(st.nextToken());
int L = Integer.parseInt(st.nextToken());
int[] h = new int[L];
for (int i = 0; i < n; i++)
{
st = new StringTokenizer(f.readLine());
for (int j = 0; j < m; j++)
{
int pixel = Integer.parseInt(st.nextToken());
h[pixel]++;
}
}
for (int i = 0; i < L; i++)
{
out.print(h[i] + " ");
}
out.println();
out.close();
f.close();
}
public static void main(String[] args) throws IOException
{
new Main();
}
}