#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int maxn = 1e6 + 5;
long long int power(long long int base, long long int exp) {
  long long int res = 1;
  while (exp) {
    if (exp % 2) res *= base;
    base *= base;
    res %= mod;
    base %= mod;
    exp /= 2;
  }
  return res;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n, a, b, i, j;
  cin >> n >> a >> b;
  int x = -1, y = -1;
  for (i = 0; i <= n; i++) {
    int left = n - i * a;
    if (left < 0) break;
    if (left % b == 0) {
      x = i, y = left / b;
      break;
    }
  }
  if (x == -1) {
    cout << -1;
    return 0;
  }
  j = 1;
  vector<int> ans;
  for (i = 1; i <= x; i++) {
    ans.push_back(j + a - 1);
    for (int k = j; k < j + a - 1; k++) {
      ans.push_back(k);
    }
    j = j + a;
  }
  for (i = 1; i <= y; i++) {
    ans.push_back(j + b - 1);
    for (int k = j; k < j + b - 1; k++) {
      ans.push_back(k);
    }
    j = j + b;
  }
  for (auto it : ans) {
    cout << it << " ";
  }
  return 0;
}
