#include <bits/stdc++.h>
using namespace std;
int n, a, b;
int ara[1000010];
void input() {
  int i, j, cnt, fl = 0;
  scanf("%d %d %d", &n, &a, &b);
  int baki, bad;
  for (i = 0;; i++) {
    bad = a * i;
    if (bad > n) {
      break;
    }
    baki = n - bad;
    if (baki % b == 0) {
      fl = 1;
      break;
    }
  }
  if (fl == 1) {
    cnt = 0;
    int to = bad / a;
    int frst = 1, last = frst + a - 1;
    for (i = 1; i <= to; i++) {
      for (j = frst + 1; j <= last; j++) {
        ara[cnt] = j;
        cnt++;
      }
      ara[cnt] = frst;
      cnt++;
      frst = last + 1;
      last = frst + a - 1;
    }
    to = baki / b;
    frst = bad + 1;
    last = frst + b - 1;
    for (i = 1; i <= to; i++) {
      for (j = frst + 1; j <= last; j++) {
        ara[cnt] = j;
        cnt++;
      }
      ara[cnt] = frst;
      cnt++;
      frst = last + 1;
      last = frst + b - 1;
    }
    for (int i = 0; i <= cnt - 1; i++) {
      if (i != 0) {
        printf(" ");
      }
      printf("%d", ara[i]);
    }
    printf("\n");
    ;
  } else {
    printf("%d", -1);
    puts("");
  }
}
void solve() {}
int main() {
  input();
  return 0;
}
