#include <bits/stdc++.h>
int dx[] = {0, 0, 1, -1, 1, 1, -1, -1};
int dy[] = {1, -1, 0, 0, -1, 1, 1, -1};
using namespace std;
int main() {
  ios::sync_with_stdio(0), cin.tie(0);
  int n, a, b;
  cin >> n >> a >> b;
  int ansA = -1, ansB = -1;
  for (int i = 0; i * a <= n; ++i) {
    int f = i * a, s = n - f;
    if (s % b == 0) {
      ansA = i, ansB = s / b;
      break;
    }
  }
  if (ansA == -1) {
    cout << -1 << '\n';
    return 0;
  }
  vector<int> res;
  int r = 1;
  while (ansA--) {
    int lst = r;
    r += (a - 1);
    res.push_back(r);
    for (int i = lst; i < r; ++i) res.push_back(i);
    r++;
  }
  while (ansB--) {
    int lst = r;
    r += (b - 1);
    res.push_back(r);
    for (int i = lst; i < r; ++i) res.push_back(i);
    r++;
  }
  for (int x : res) cout << x << ' ';
  cout << '\n';
}
