#include <bits/stdc++.h>
using namespace std;
void debug(string S = "hello ! debug") {
  cout << S << endl;
  return;
}
template <class T>
void printVector(vector<T> &V) {
  cout << endl;
  for (int i = 0; i < V.size(); ++i) {
    cout << V[i] << " ";
  }
  cout << endl;
  return;
}
template <class T>
void printVectorWithMessage(vector<T> &V, string S = "Printing Vector") {
  cout << endl;
  cout << S;
  cout << endl;
  for (int i = 0; i < V.size(); ++i) {
    cout << V[i] << " ";
  }
  cout << endl;
  return;
}
template <class T>
T maximumFromVector(vector<T> &V) {
  T ans = V[0];
  for (int i = 1; i < V.size(); ++i) {
    ans = max(ans, V[i]);
  }
  return ans;
}
template <class T>
T minimumFromVector(vector<T> &V) {
  T ans = V[0];
  for (int i = 1; i < V.size(); ++i) {
    ans = min(ans, V[i]);
  }
  return ans;
}
long long int sizeOfSt(long long int N) {
  long long int x = (long long int)(ceil(log2(N)));
  long long int max_size = 2 * (long long int)pow(2, x) - 1;
  return max_size;
}
template <class T, class V>
void printMap(unordered_map<T, V> &M) {
  typename unordered_map<T, V>::iterator it = M.begin();
  while (it != M.end()) {
    cout << it->first << " " << it->second << "\t\t";
    ++it;
  }
  cout << endl;
  return;
}
template <class T>
void printSet(unordered_set<T> &M) {
  typename unordered_set<T>::iterator it = M.begin();
  while (it != M.end()) {
    cout << *it << " ";
    ++it;
  }
  cout << endl;
  return;
}
int main() {
  long long int n, a, b;
  scanf("%lld", &n);
  scanf("%lld", &a);
  scanf("%lld", &b);
  vector<long long int> v(n + 1, false);
  v[a] = a;
  v[b] = b;
  for (long long int i = min(a, b); i <= n; ++i) {
    if (i > b) {
      if (v[i - b]) v[i] = b;
    }
    if (v[i]) continue;
    if (i > a) {
      if (v[i - a]) v[i] = a;
    }
  }
  if (!v[n]) {
    cout << -1;
    return 0;
  }
  long long int f = n;
  vector<vector<long long int> > p;
  long long int it = 1;
  vector<long long int> ans;
  while (f != 0) {
    p.push_back(vector<long long int>());
    long long int k = p.size() - 1;
    for (int i = 0; i < v[f]; ++i) {
      p[k].push_back(it++);
    }
    long long int si = v[f];
    for (int j = 0; j < p[k].size() - 1; ++j) {
      ans.push_back(p[k][j] + 1);
    }
    ans.push_back(p[k][0]);
    f = f - v[f];
  }
  for (long long int i = 0; i < ans.size(); ++i) {
    printf("%lld ", ans[i]);
  }
  return 0;
}
