#include <bits/stdc++.h>
using namespace std;
const int N = 1000 + 10;
const int M = 100000 + 10;
const int MOD = 1e9 + 7;
const double PI = acos(-1.0);
const double EXP = 1E-8;
const int INF = 0x3f3f3f3f;
int n, x, pos;
int main() {
  std::ios::sync_with_stdio(false);
  std::cin.tie(0);
  ;
  cin >> n >> x >> pos;
  int nl = x - 1;
  int nr = n - x;
  int l = 0, r = n, mid;
  int cntr = 0, cntl = 0;
  for (;;) {
    if (l >= r) break;
    mid = (l + r) >> 1;
    if (mid < pos) {
      cntl++;
      l = mid + 1;
    } else if (mid == pos)
      l = mid + 1;
    else {
      cntr++;
      r = mid;
    }
  }
  long long ans = 1;
  if (nl >= cntl && nr >= cntr) {
    for (int i = nl; i > nl - cntl; i--) ans = ans * i % MOD;
    for (int i = nr; i > nr - cntr; i--) ans = ans * i % MOD;
    for (int i = 1; i <= n - cntr - cntl - 1; i++) ans = ans * i % MOD;
    printf("%lld", ans);
  } else
    printf("0");
  return 0;
}
