#include <bits/stdc++.h>
using namespace std;
long long int binpow(long long int a, long long int b,
                     long long int m = 1000000007) {
  long long int res = 1;
  while (b > 0) {
    if (b & 1) res = (res * a) % m;
    a = (a * a) % m;
    b /= 2;
  }
  return res;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n, a, b;
  cin >> n >> a >> b;
  long long int in = -1;
  for (long long int x = 0; x <= n; x++) {
    if (n >= x * a && (n - x * a) % b == 0) {
      in = x;
      break;
    }
  }
  if (in == -1) {
    cout << -1;
    return 0;
  }
  long long int i = 1;
  vector<long long int> ans;
  long long int g = (n - in * a) / b;
  if (in > 0)
    while (in--) {
      for (long long int x = i; x <= i + a - 2; x++) {
        ans.push_back(x + 1);
      }
      ans.push_back(i);
      i += a;
    }
  if (g > 0)
    while (g--) {
      for (long long int x = i; x <= i + b - 2; x++) {
        ans.push_back(x + 1);
      }
      ans.push_back(i);
      i += b;
    }
  for (auto it : ans) cout << it << " ";
}
