#include <bits/stdc++.h>
using namespace std;
vector<long long> res;
long long n, a, b;
void solve(long long x, long long y) {
  long long i, k;
  for (i = 1, k = 0; k < x; i += a, k++) {
    for (long long j = i + 1; j < i + a; j++) res.push_back(j);
    res.push_back(i);
  }
  for (k = 0; k < y; i += b, k++) {
    for (long long j = i + 1; j < i + b; j++) res.push_back(j);
    res.push_back(i);
  }
}
int main() {
  cout.sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n >> a >> b;
  for (long long i = 0; i <= n; i++)
    if (a * i <= n and (n - a * i) % b == 0) {
      solve(i, (n - a * i) / b);
      for (long long val : res) cout << val << " ";
      cout << endl;
      return 0;
    }
  cout << -1 << endl;
  return 0;
}
