#include <bits/stdc++.h>
using namespace std;
inline int read() {
  char c = getchar();
  int num = 0, f = 1;
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c <= '9' && c >= '0') {
    num = num * 10 + c - '0';
    c = getchar();
  }
  return num * f;
}
int n, A, B;
int main() {
  n = read();
  A = read();
  B = read();
  if (A > B) swap(A, B);
  for (int i = 0; i < A; i++) {
    if ((n - i * B) % A == 0) {
      for (int j = 1; j <= i; j++) {
        int beg = j * B;
        printf("%d ", beg);
        for (int k = 1; k < B; k++) printf("%d ", beg - B + k);
      }
      for (int j = 1; j <= (n - i * B) / A; j++) {
        int beg = i * B + j * A;
        printf("%d ", beg);
        for (int k = 1; k < A; k++) printf("%d ", beg - A + k);
      }
      return 0;
    } else if ((n - i * B) < A)
      break;
  }
  printf("-1");
  return 0;
}
