#include <bits/stdc++.h>
using namespace std;
int x, y;
bool solution(int a, int b, int n) {
  for (int i = 0; i * a <= n; i++) {
    if ((n - (i * a)) % b == 0) {
      x = i;
      y = (n - (i * a)) / b;
      return 1;
    }
  }
  return 0;
}
int main() {
  int n, a, b, cur = 1;
  cin >> n >> a >> b;
  vector<int> ans;
  bool cc = solution(a, b, n);
  if (cc == 0) {
    cout << -1;
    return 0;
  }
  while (x != 0) {
    vector<int> vec;
    for (int i = 0; i < a; i++) {
      vec.push_back(cur);
      cur++;
    }
    for (int i = 1; i < a; i++) {
      ans.push_back(vec[i]);
    }
    ans.push_back(vec[0]);
    x--;
  }
  while (y != 0) {
    vector<int> vec;
    for (int i = 0; i < b; i++) {
      vec.push_back(cur);
      cur++;
    }
    for (int i = 1; i < b; i++) {
      ans.push_back(vec[i]);
    }
    ans.push_back(vec[0]);
    y--;
  }
  for (int i = 0; i < ans.size(); i++) {
    cout << ans[i] << " ";
  }
}
