#include <bits/stdc++.h>
using namespace std;
long long mod = 1e9 + 7;
long long fact[1005];
long long power(long long a, long long n) {
  long long res = 1;
  while (n > 0) {
    if (n & 1) {
      res *= a;
      res %= mod;
    }
    a *= a;
    a %= mod;
    n >>= 1;
  }
  return res;
}
long long choose(long long n, long long r) {
  long long ret = fact[n];
  ret *= power(fact[n - r], mod - 2);
  ret %= mod;
  ret *= power(fact[r], mod - 2);
  ret %= mod;
  return ret;
}
void solve() {
  int n, x, p;
  cin >> n >> x >> p;
  int l = 0, r = n;
  int L = 0, R = 0;
  while (l < r) {
    int m = (l + r) / 2;
    if (m <= p) {
      if (m < p) L++;
      l = m + 1;
    } else {
      R++;
      r = m;
    }
  }
  long long ans = 1;
  if (R > n - x || L > x - 1)
    cout << 0 << endl;
  else {
    ans *= choose(n - x, R);
    ans %= mod;
    ans *= choose(x - 1, L);
    ans %= mod;
    ans *= fact[L];
    ans %= mod;
    ans *= fact[R];
    ans %= mod;
    ans *= fact[n - L - R - 1];
    ans %= mod;
    cout << ans << endl;
  }
}
int main(void) {
  fact[0] = 1;
  for (int i = 1; i <= 1000; i++) {
    fact[i] = fact[i - 1] * i;
    fact[i] %= mod;
  }
  solve();
  return 0;
}
