#include <bits/stdc++.h>
using namespace std;
int Max(int a, int b) { return a > b ? a : b; }
int Min(int a, int b) { return a < b ? a : b; }
int N, A, B, C, D, n, ans[1000005], len = 1;
int main() {
  scanf("%d%d%d", &N, &A, &B);
  n = N;
  C = Min(A, B);
  D = Max(A, B);
  A = 0;
  B = 0;
  while (N > 0) {
    if (N % C == 0) {
      A = N / C;
      break;
    }
    B++;
    N -= D;
  }
  if (B * D + A * C != n) {
    printf("-1");
    return 0;
  }
  for (int i = 1; i <= A; i++) {
    for (int j = len; j <= len + C - 1; j++) {
      if (j == len) {
        ans[j] = C + len - 1;
        continue;
      }
      ans[j] = j - 1;
      ;
    }
    len += C;
  }
  for (int i = 1; i <= B; i++) {
    for (int j = len; j <= len + D - 1; j++) {
      if (j == len) {
        ans[j] = D + len - 1;
        continue;
      }
      ans[j] = j - 1;
    }
    len += D;
  }
  for (int i = 1; i < n; i++) printf("%d ", ans[i]);
  printf("%d", ans[n]);
}
