#include <bits/stdc++.h>
using namespace std;
const long long kMaxN = 1000 + 5;
const long long Mod = 1000000000 + 7;
long long n, x, pos, l, r, ans, bigx, smallx, Fac[kMaxN];
inline long long ksm(long long x, long long y) {
  if (y == 0) {
    return 1;
  }
  if (y == 1) {
    return x;
  }
  if (y % 2 == 0) {
    long long cnt = ksm(x, y / 2);
    cnt = (cnt * cnt) % Mod;
    return cnt;
  }
  if (y % 2 == 1) {
    long long cnt = ksm(x, y / 2);
    cnt = (cnt * cnt) % Mod;
    cnt = (cnt * x) % Mod;
    return cnt;
  }
}
inline void Pre_process() {
  Fac[0] = 1;
  for (long long i = 1; i <= n; i++) {
    Fac[i] = Fac[i - 1] * i % Mod;
    l;
  }
  return;
}
inline long long read() {
  long long s = 0, w = 1;
  char ch = getchar();
  while ((ch < '0') || (ch > '9')) {
    if (ch == '-') {
      w = -1;
    }
    ch = getchar();
  }
  while ((ch >= '0') && (ch <= '9')) {
    s = (s << 3) + (s << 1) + ch - '0';
    ch = getchar();
  }
  return s * w;
}
inline void write(long long x) {
  if (x < 0) {
    putchar('-');
    x = -x;
  }
  if (x > 9) {
    write(x / 10);
  }
  putchar(x % 10 + '0');
  return;
}
signed main() {
  n = read();
  x = read();
  pos = read();
  l = 0;
  r = n;
  while (l < r) {
    long long mid = (l + r) >> 1;
    if (mid < pos) {
      smallx++;
      l = mid + 1;
    }
    if (mid == pos) {
      l = mid + 1;
    }
    if (mid > pos) {
      bigx++;
      r = mid;
    }
  }
  Pre_process();
  if (x - 1 - smallx < 0 || n - x - bigx < 0 || n - smallx - bigx - 1 < 0) {
    cout << 0 << endl;
    return 0;
  }
  ans = 1;
  ans = ((ans * Fac[n - smallx - bigx - 1]) % Mod);
  ans = ((((ans * Fac[n - x]) % Mod) * ksm(Fac[n - x - bigx], Mod - 2)) % Mod);
  ans =
      ((((ans * Fac[x - 1]) % Mod) * ksm(Fac[x - 1 - smallx], Mod - 2)) % Mod);
  cout << ans << endl;
  return 0;
}
