#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.0);
const long long mod = 1000000007;
long long Abs(long long x) { return (x < 0) ? -x : x; }
int Read() {
  char ch;
  int res = 0;
  while (ch = getchar(), !(('0' <= (ch) && (ch) <= '9')))
    ;
  while (('0' <= (ch) && (ch) <= '9'))
    res = res * 10 + ch - '0', ch = getchar();
  return res;
}
long long exgcd(long long a, long long b, long long &x, long long &y) {
  if (!b) return x = 1, y = 0, a;
  long long d = exgcd(b, a % b, x, y), t = x;
  return x = y, y = t - a / b * y, d;
}
bool calc(long long a, long long b, long long n, long long &x, long long &y) {
  long long d = exgcd(a, b, x, y);
  if (n % d) return false;
  a /= d;
  b /= d;
  x *= n;
  x = (x % b + b) % b;
  y = (n - a * x) / b;
  x /= d;
  y /= d;
  return true;
}
int main() {
  long long n, a, b;
  long long x, y;
  scanf("%I64d %I64d %I64d", &n, &a, &b);
  if (calc(a, b, n, x, y)) {
    if (x < 0 || y < 0) {
      printf("-1\n");
      return 0;
    }
    int num = 1;
    bool output = false;
    for (int(tx) = (1); (tx) <= (x); ++(tx)) {
      for (int(i) = (num + 1); (i) <= (num + a - 1); ++(i)) {
        if (output) printf(" ");
        printf("%d", i);
        output = true;
      }
      if (output) printf(" ");
      printf("%d", num);
      num += a;
      output = true;
    }
    for (int(ty) = (1); (ty) <= (y); ++(ty)) {
      for (int(i) = (num + 1); (i) <= (num + b - 1); ++(i)) {
        if (output) printf(" ");
        printf("%d", i);
        output = true;
      }
      if (output) printf(" ");
      printf("%d", num);
      num += b;
      output = true;
    }
    printf("\n");
  } else
    printf("-1\n");
  return 0;
}
