#include <stdio.h>

void count_elements(int a[], int b[], int c[], int size_a, int size_b) {
    int i, j, count;
    for (i = 0; i < size_b - 1; i++) {
        count = 0;
        for (j = 0; j < size_a; j++) {
            if (b[i] < a[j] && a[j] < b[i + 1]) {
                count++;
            }
        }
        c[i] = count;
    }
}

int main() {
    int a[10];
    int b[5];
    int c[4]; // Assuming c has 4 elements based on the size of b
	int i;
    // Input a and b
   
    for (i = 0; i < 10; i++) {
        scanf("%d", &a[i]);
    }

   
    for (i = 0; i < 5; i++) {
        scanf("%d", &b[i]);
    }

    count_elements(a, b, c, 10, 5);

    // Output array c
    printf("c = ");
    for (i = 0; i < 4; i++) {
        printf("%d ", c[i]);
    }
    printf("\n");

    return 0;
}
