#include <stdio.h>
#include <stdlib.h>

int max(int *array, int l){
    int maxp=0;
    int maxv=array[0];
    int i;
    for(i=1; i<l; i++)
        if (array[i]>maxv) {
            maxv=array[i];
            maxp=i;
        }
    return maxp;
}

int main(int argc, char **argv){
    FILE *fin;
    int max_hp, i, n, p, q;
    int *a;
    if (argc<2) return -1;
    fin=fopen(argv[1],"r");
    if (!fin) return -1;
    fscanf(fin, "%d %d %d\n", &n, &p, &q);
    if (p<q) return -1;
    a=malloc(sizeof(int)*n);
    for(i=0; i<n; i++)
        fscanf(fin, "%d", &a[i]);
    while(1){
        max_hp = max(a,n);
        if (a[max_hp]<0) {
            printf("\n");
            return 0;
        }
        printf("%d ", max_hp);
        for(i=0; i<n; i++)
            if (i==max_hp) a[i]-=p;
            else a[i]-=q;
    }
    /* Cannot reach this point */
    return -2;
}
