#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a, b;
  scanf("%d%d%d", &n, &a, &b);
  if (b > a) {
    int tmp;
    tmp = a;
    a = b;
    b = tmp;
  }
  int acount = 0;
  int bcount = -1;
  while (n >= 0) {
    if (n % b == 0) {
      bcount = n / b;
      break;
    }
    n -= a;
    ++acount;
  }
  if (bcount == -1) {
    printf("-1\n");
    return 0;
  }
  int ptr = 1;
  for (int i = 0; i < acount; ++i) {
    for (int j = 1; j < a; ++j) printf("%d ", j + ptr);
    printf("%d ", ptr);
    ptr += a;
  }
  for (int i = 0; i < bcount; ++i) {
    for (int j = 1; j < b; ++j) printf("%d ", j + ptr);
    printf("%d ", ptr);
    ptr += b;
  }
  printf("\n");
}
