#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline void Int(T &n) {
  n = 0;
  int f = 1;
  register int ch = getchar();
  for (; !isdigit(ch); ch = getchar())
    if (ch == '-') f = -1;
  for (; isdigit(ch); ch = getchar()) n = (n << 3) + (n << 1) + ch - '0';
  n = n * f;
}
template <typename T>
T gcd(T a, T b) {
  return !b ? a : gcd(b, a % b);
}
template <typename T>
T modinverse(T bs) {
  return modpow(bs, 1000000007LL - 2);
}
template <typename T>
inline void umin(T &a, T b) {
  a = a < b ? a : b;
}
template <typename T>
inline void umax(T &a, T b) {
  a = a > b ? a : b;
}
template <typename T, typename W>
inline void Int(T &x, W &y) {
  Int(x), Int(y);
}
template <typename T, typename W, typename Q>
inline void Int(T &x, W &y, Q &z) {
  Int(x, y), Int(z);
}
const int N = 1e6 + 7;
const int inf = 1e9 + 7;
int main() {
  int n, a, b;
  Int(n, a, b);
  int ok = 0, from;
  for (int i = 0; i <= n; i += a) {
    int rest = n - i;
    if (rest % b == 0) ok = 1, from = i + 1;
  }
  if (!ok) return !printf("-1\n");
  vector<int> res;
  for (int i = 0; i + a < from; i += a) {
    res.push_back(i + a);
    for (int j = i + 1; j <= i + a - 1; ++j) res.push_back(j);
  }
  for (int i = from; i + b - 1 <= n; i += b) {
    res.push_back(i + b - 1);
    for (int j = i; j <= i + b - 2; ++j) res.push_back(j);
  }
  for (int i = 0; i < res.size(); i++) {
    printf("%d ", res[i]);
  }
  printf("\n");
  return 0;
}
