import java.util.*;

public class cinema {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int n = s.nextInt(), m = s.nextInt(), c = s.nextInt();

        int[] t = new int[n], h = new int[m];
        for (int i = 0; i < n; i++) t[i] = s.nextInt();
        for (int j = 0; j < m; j++) h[j] = s.nextInt();

        int[] ans = new int[m];
        int i = 0;
        for (int j = 0; j < m && i < n; j++) {
            while (i < n && t[i] <= h[j] && ans[j] < c) {
                ans[j]++;
                i++;
            }
        }

        for(int e : ans)
            System.out.print(e + " ");
        System.out.println();         

        s.close();
    }
}
