#include <bits/stdc++.h>
using namespace std;
long long x = -1;
long long y = -1;
long long check(long long n, long long a, long long b) {
  for (long long yy = 0; yy * b <= n; ++yy) {
    if ((n - b * yy) % a == 0) {
      x = (n - b * yy) / a;
      y = yy;
      return 0;
    }
  }
  return 1;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t, n, m, a, b;
  cin >> n >> a >> b;
  if (check(n, a, b)) {
    cout << -1;
    return 0;
  }
  vector<int> ans;
  long long curr = 0;
  for (int i = 1; i <= x; ++i) {
    cout << curr + a << " ";
    for (int j = curr + 1; j <= curr + a - 1; ++j) cout << j << " ";
    curr += a;
  }
  for (int i = 1; i <= y; ++i) {
    cout << curr + b << " ";
    for (int j = curr + 1; j < curr + b; ++j) cout << j << " ";
    curr += b;
  }
  return 0;
}
