#include <bits/stdc++.h>
using namespace std;
int n, a, b;
int x, y, z;
int aa, bb, cc;
int ok;
int main() {
  scanf("%d%d%d", &n, &a, &b);
  ok = 0;
  for (int i = 0; i <= n; i++) {
    x = a * i;
    if (x > n) break;
    if ((n - x) % b == 0) {
      y = (n - x) / b;
      cc = 1;
      for (int j = 0; j < i; j++) {
        aa = cc;
        bb = cc + a - 1;
        printf("%d ", bb);
        for (int k = 1; k < a; k++) {
          printf("%d ", aa);
          aa++;
        }
        cc = bb + 1;
      }
      for (int j = 0; j < y; j++) {
        aa = cc;
        bb = cc + b - 1;
        printf("%d ", bb);
        for (int k = 1; k < b; k++) {
          printf("%d ", aa);
          aa++;
        }
        cc = bb + 1;
      }
      printf("\n");
      ok = 1;
      break;
    }
  }
  if (!ok) printf("-1\n");
  return 0;
}
