#include <bits/stdc++.h>
using namespace std;
long long arr[1000005];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long n, a, b, tmp, x, y;
  cin >> n >> a >> b;
  bool valid = 0;
  for (long long i = 0; i <= 1e6; i++) {
    y = (n - i * a) / b;
    if (i * a + b * y == n && y >= 0) {
      valid = 1;
      x = i;
      break;
    }
  }
  if (!valid) {
    cout << -1 << endl;
    return 0;
  }
  int cnt = 1;
  for (int i = 0; i < x; i++) {
    int tmp = cnt;
    for (int j = 1; j <= a; j++) {
      if (j == a) {
        arr[cnt] = tmp;
        cnt++;
      } else {
        arr[cnt] = cnt + 1;
        cnt++;
      }
    }
  }
  for (int i = 0; i < y; i++) {
    int tmp = cnt;
    for (int j = 1; j <= b; j++) {
      if (j == b) {
        arr[cnt] = tmp;
        cnt++;
      } else {
        arr[cnt] = cnt + 1;
        cnt++;
      }
    }
  }
  for (int i = 1; i <= n; i++) cout << arr[i] << " ";
  cout << endl;
  return 0;
}
