#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
vector<long long> fac, facinv;
long long nCk(int n, int k) {
  if (k > n) return 0;
  long long ans = fac[n] * facinv[k] % mod;
  ans = ans * facinv[n - k] % mod;
  return ans;
}
void factorial(int n) {
  fac.resize(n + 1);
  facinv.resize(n + 1);
  vector<long long> inv(n + 1);
  fac[0] = 1;
  inv[0] = 1;
  facinv[0] = 1;
  fac[1] = 1;
  inv[1] = 1;
  facinv[1] = 1;
  for (int i = 2; i <= n; ++i) {
    inv[i] = (mod - (mod / i) * inv[mod % i] % mod) % mod;
    fac[i] = (fac[i - 1] * i) % mod;
    facinv[i] = (facinv[i - 1] * inv[i]) % mod;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n, x, pos;
  cin >> n >> x >> pos;
  factorial(100000);
  long long left = 0, right = n;
  long long l = 0, g = 0;
  while (left < right) {
    int mid = (left + right) / 2;
    if (mid <= pos) {
      if (mid != pos) l++;
      left = mid + 1;
    } else {
      g++;
      right = mid;
    }
  }
  if (left - 1 != pos) {
    cout << "0\n";
    return 0;
  }
  long long ans = (nCk(x - 1, l) * 1ll * nCk(n - x, g)) % mod;
  ans = (ans * fac[l]) % mod;
  ans = (ans * fac[g]) % mod;
  ans = ans * 1ll * fac[n - l - g - 1];
  cout << ans % mod << '\n';
  return 0;
}
