#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, x, p;
  cin >> n >> x >> p;
  long long cnts = 0, cntb = 0, l = 0, h = n, m;
  while (l < h) {
    m = (l + h) / 2;
    if (m <= p) {
      if (m < p) cnts++;
      l = m + 1;
    } else {
      cntb++;
      h = m;
    }
  }
  if (not(l > 0 and l - 1 == p)) {
    cout << 0 << '\n';
  }
  long long ans = 1;
  long long mod = 1e9 + 7;
  for (long long i = 0; i < cnts; i++) {
    long long a = x - 1 - i;
    ans *= a;
    ans = ans % mod;
  }
  for (long long i = 0; i < cntb; i++) {
    long long a = n - x - i;
    ans *= a;
    ans = ans % mod;
  }
  long long dont = n - cnts - cntb - 1;
  for (long long i = 1; i <= dont; i++) {
    ans *= i;
    ans = ans % mod;
  }
  cout << ans << endl;
}
