#include <bits/stdc++.h>
using namespace std;
unsigned long long fac[1005];
unsigned long long power(unsigned long long x, int y, int p) {
  unsigned long long res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
unsigned long long modInverse(unsigned long long n, int p) {
  return power(n, p - 2, p);
}
unsigned long long ncr(unsigned long long n, int r, int p) {
  if (n < r) return 0;
  if (r == 0) return 1;
  return (fac[n] * modInverse(fac[r], p) % p * modInverse(fac[n - r], p) % p) %
         p;
}
void solve() {
  long long n, x, pos;
  cin >> n >> x >> pos;
  long long sm = 0, gr = 0;
  long long l = 0, r = n;
  while (l < r) {
    long long mid = (l + r) / 2;
    if (mid == pos)
      l = mid + 1;
    else if (mid < pos) {
      sm++;
      l = mid + 1;
    } else {
      gr++;
      r = mid;
    }
  }
  if (sm > x - 1 || gr > n - x) {
    cout << "0" << endl;
    return;
  }
  long long smcnt = (ncr(x - 1, sm, 1000000007) * fac[sm]) % 1000000007;
  long long grcnt = (ncr(n - x, gr, 1000000007) * fac[gr]) % 1000000007;
  long long ans = (smcnt * grcnt) % 1000000007;
  ans = (ans * fac[n - 1 - sm - gr]) % 1000000007;
  cout << ans << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  fac[0] = 1;
  for (int i = 1; i <= 1003; i++) fac[i] = (fac[i - 1] * i) % 1000000007;
  long long t = 1;
  while (t--) solve();
  return 0;
}
