#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, a, b;
  cin >> n >> a >> b;
  long long x = n / a;
  long long y = n % a;
  while (x >= 0 and y % b != 0) {
    x--;
    y += a;
  }
  if (x < 0 or y % b != 0) {
    cout << -1 << endl;
  } else {
    for (int i = 0; i < x * a; i++) {
      if (i % a == 0) {
        cout << i + a << " ";
      } else
        cout << i << " ";
    }
    for (int i = x * a, j = 0; i < n; i++, j++) {
      if (j % b == 0) {
        cout << i + b << " ";
      } else
        cout << i << " ";
    }
    cout << endl;
  }
  return 0;
}
