#include <bits/stdc++.h>
using namespace std;
long long int p1, q1;
int solve(long long int a, long long int b, long long int n) {
  long long int i;
  for (i = 0; i * a <= n; i++) {
    if ((n - a * i) % b == 0) {
      p1 = i;
      q1 = (n - a * i) / b;
      return 0;
    }
  }
  return 1;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int n, a, b, j;
  cin >> n >> a >> b;
  long long int mx = max(a, b), mn = min(a, b);
  long long int c = solve(max(a, b), min(a, b), n);
  if (c) return cout << -1, 0;
  long long int ans = 1;
  while (p1--) {
    for (j = 0; j < mx; j++) {
      if (j == 0)
        cout << ans + mx - 1 << " ";
      else
        cout << ans << " ", ans++;
    }
    ans++;
  }
  while (q1--) {
    for (j = 0; j < mn; j++) {
      if (j == 0)
        cout << ans + mn - 1 << " ";
      else
        cout << ans << " ", ans++;
    }
    ans++;
  }
}
