#include <bits/stdc++.h>
using namespace std;
const int M = 1e9 + 7;
long long fastpower(long long x, long long n, long long M) {
  if (n == 0)
    return 1;
  else if (n % 2 == 0)
    return fastpower((x * x) % M, n / 2, M);
  else
    return (x * fastpower((x * x) % M, (n - 1) / 2, M)) % M;
}
long long GCD(long long A, long long B) {
  if (B == 0)
    return A;
  else
    return GCD(B, A % B);
}
bool vowl(char c) {
  return c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u';
}
long long modInverse(long long A, long long M) {
  return fastpower(A, M - 2, M);
}
void sieve(long long N) {
  bool isPrime[N + 1];
  for (long long i = 0; i <= N; ++i) {
    isPrime[i] = true;
  }
  isPrime[0] = false;
  isPrime[1] = false;
  for (long long i = 2; i * i <= N; ++i) {
    if (isPrime[i] == true) {
      for (long long j = i * i; j <= N; j += i) isPrime[j] = false;
    }
  }
}
vector<long long> factorize(long long n) {
  vector<long long> res;
  for (long long i = 2; i * i <= n; ++i) {
    while (n % i == 0) {
      res.push_back(i);
      n /= i;
    }
  }
  if (n != 1) {
    res.push_back(n);
  }
  return res;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  long long arr[1005];
  arr[0] = 1;
  for (long long i = 1; i <= 1000; i++) {
    arr[i] = (arr[i - 1] * i) % M;
  }
  while (t--) {
    long long n;
    cin >> n;
    long long x, p;
    cin >> x >> p;
    long long l = 0, r = 0;
    long long a = 0, b = n;
    while (a < b) {
      long long mid = (a + b) / 2;
      if (mid <= p) {
        a = mid + 1;
        l++;
      } else if (mid > p) {
        b = mid;
        r++;
      }
    }
    int flag = 0;
    if (l > x) flag = 1;
    if (r > (n - x)) flag = 1;
    if (l) l--;
    long long ans = 1;
    ans *= ((arr[x - 1] % M * modInverse(arr[x - 1 - l], M) % M) *
            modInverse(arr[l], M)) %
           M;
    ans %= M;
    ans *= arr[l];
    ans %= M;
    ans *= arr[n - 1 - l - r];
    ans %= M;
    ans *= ((arr[n - x] % M * modInverse(arr[n - x - r], M) % M) *
            modInverse(arr[r], M)) %
           M;
    ans %= M;
    ans *= arr[r];
    ans %= M;
    if (flag)
      cout << "0" << endl;
    else
      cout << ans << endl;
  }
  return 0;
}
