#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, a, b;
  cin >> n >> a >> b;
  bool ver = false;
  long long x = 0;
  long long y;
  while (x < b) {
    if ((n - (x * a)) % b == 0 && (n - (x * a)) / b >= 0) {
      y = (n - (x * a)) / b;
      ver = true;
      break;
    }
    x++;
  }
  if (!ver) {
    cout << -1 << endl;
    return 0;
  }
  long long num = 1;
  for (long long i = 0; i < x; i++) {
    for (long long j = 0; j < a; j++) {
      if (j == a - 1) {
        cout << num + 1 - a << " ";
      } else {
        cout << num + 1 << " ";
      }
      num++;
    }
  }
  for (long long i = 0; i < y; i++) {
    for (long long j = 0; j < b; j++) {
      if (j == b - 1) {
        cout << num + 1 - b << " ";
      } else {
        cout << num + 1 << " ";
      }
      num++;
    }
  }
  cout << endl;
  return 0;
}
