#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a, b;
  scanf("%d%d%d", &n, &a, &b);
  int x = -1, y = -1;
  for (int i = 0; i * a <= n; i++) {
    int s = n - i * a;
    double k = (double)s / b;
    int p = (int)k;
    if (p * b == s) {
      x = i, y = p;
      break;
    }
  }
  if (x == -1 && y == -1) {
    cout << -1;
    return 0;
  }
  int i = 1;
  int x1 = x, y1 = y;
  while (i <= n) {
    if (x1) {
      if ((x - x1 + 1) * a == i) {
        printf("%d ", (x - x1) * a + 1);
        x1--;
      } else
        printf("%d ", i + 1);
      i++;
    } else {
      if ((y - y1 + 1) * b == (i - x * a)) {
        printf("%d ", (y - y1) * b + 1 + x * a);
        y1--;
      } else
        printf("%d ", i + 1);
      i++;
    }
  }
  return 0;
}
