#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int a, b, n;
  cin >> n >> a >> b;
  long long int c1, c2, c = 0, x;
  for (int i = 0; i <= n; i++) {
    x = (n - (a * i)) / b;
    if ((i * a) + (x * b) == n && x >= 0) {
      c1 = i;
      c2 = x;
      c = 1;
      break;
    }
  }
  if (c == 0) {
    cout << "-1";
    return 0;
  } else {
    for (int i = 1; i <= c1; i++) {
      cout << i * a << " ";
      for (int j = a - 1; j > 0; j--) cout << i * a - j << " ";
    }
    x = c1 * a;
    for (int i = 1; i <= c2; i++) {
      cout << x + i * b << " ";
      for (int j = b - 1; j > 0; j--) cout << x + i * b - j << " ";
    }
  }
  return 0;
}
