#include <bits/stdc++.h>
using namespace std;
long long power(long long x, long long y) {
  long long res = 1LL;
  x = x % 1000000007;
  while (y > 0) {
    if (y & 1) res = (res * x) % 1000000007;
    y = y >> 1;
    x = (x * x) % 1000000007;
  }
  return res % 1000000007;
}
long long inv(long long n) { return power(n, 1000000007 - 2) % 1000000007; }
const int32_t N = 3e5 + 5;
long long n, x, p;
long long tl, tr, rl, rr;
void f(long long l, long long r) {
  long long mid = (l + r) / 2;
  if (p == mid) {
    l = p + 1;
    while (l < r) {
      mid = (l + r) / 2;
      r = mid;
      rr++;
    }
    return;
  } else if (mid < p) {
    rl++;
    f(mid + 1, r);
  } else {
    rr++;
    f(l, mid);
  }
}
void solve() {
  cin >> n >> x >> p;
  tl = x - 1;
  tr = n - x;
  long long i;
  f(0, n);
  if (rl > tl || rr > tr)
    cout << "0\n";
  else {
    long long ans = 1;
    long long rem = n - (rr + rl + 1);
    for (i = 1; i <= rem; i++) {
      ans *= i;
      ans %= 1000000007;
    }
    for (i = tl; i > tl - rl; i--) {
      ans *= i;
      ans %= 1000000007;
    }
    for (i = tr; i > tr - rr; i--) {
      ans *= i;
      ans %= 1000000007;
    }
    cout << ans << "\n";
  }
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t = 1;
  long long i, j;
  while (t--) {
    solve();
  }
}
