#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 10;
int n, a, b;
int main() {
  scanf("%d%d%d", &n, &a, &b);
  int ac = 0, bc = 0;
  for (int i = 0; i <= n; i++) {
    long long tren = (long long)n - ((long long)a * i);
    if (tren % b == 0 && tren >= 0) {
      ac = i, bc = (n - (a * i)) / b;
      break;
    }
  }
  if (ac == 0 && bc == 0)
    printf("-1");
  else {
    for (int i = 0; i < ac; i++) {
      int tren = i * a;
      for (int j = 0; j < a - 1; j++) {
        int pr = tren + 2 + j;
        printf("%d ", pr);
      }
      printf("%d ", tren + 1);
    }
    for (int i = 0; i < bc; i++) {
      int tren = i * b + (a * ac);
      for (int j = 0; j < b - 1; j++) {
        int pr = tren + 2 + j;
        printf("%d ", pr);
      }
      printf("%d ", tren + 1);
    }
  }
  return 0;
}
