#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return (a == 0) ? b : gcd(b % a, a); }
long long ans[1000005];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, a, b;
  cin >> n >> a >> b;
  int t = n, x = 0;
  while (t >= 0 && t % b > 0) t -= a, x++;
  if (t < 0) {
    cout << -1;
    return 0;
  }
  int y = t / b;
  int z = 1;
  while (x--) {
    int w = z;
    for (long long i = z + 1; i < z + a; ++i) cout << i << " ";
    cout << w << " ";
    z += a;
  }
  while (y--) {
    int w = z;
    for (long long i = z + 1; i < z + b; ++i) cout << i << " ";
    cout << w << " ";
    z += b;
  }
  return 0;
}
