#include <bits/stdc++.h>
using namespace std;
int d4x[4] = {1, 0, -1, 0};
int d4y[4] = {0, 1, 0, -1};
int d8x[8] = {0, 1, 1, 1, 0, -1, -1, -1};
int d8y[8] = {1, 1, 0, -1, -1, -1, 0, 1};
const long long oo = 1e18;
const long long maxN = 1e6;
void maximize(int &a, int b) { a = max(a, b); }
void minimize(int &a, int b) { a = min(a, b); }
long long f[maxN], invf[maxN];
const long long MOD = 1e9 + 7;
long long Pow(long long a, long long b) {
  if (b == 1) return a;
  long long tmp = Pow(a, b / 2);
  if (b % 2) return tmp * tmp % MOD * a % MOD;
  return tmp * tmp % MOD;
}
void build() {
  int lim = 1e4;
  f[0] = 1;
  for (int i = 1; i <= lim; i++) f[i] = f[i - 1] * i % MOD;
  invf[lim] = Pow(f[lim], MOD - 2);
  for (int i = lim - 1; i >= 0; i--) invf[i] = invf[i + 1] * (i + 1) % MOD;
}
long long C(long long k, long long n) {
  if (k > n) return 0;
  return f[n] % MOD * invf[k] % MOD * invf[n - k] % MOD;
}
void solve() {
  build();
  int n, x, pos, aa = 0, bb = 0;
  cin >> n >> x >> pos;
  int L = 0, R = n;
  while (L < R) {
    int mid = (L + R) >> 1;
    if (mid <= pos) {
      if (mid < pos) aa++;
      L = mid + 1;
    } else
      R = mid, bb++;
  }
  if (L - 1 != pos) {
    cout << 0;
    return;
  }
  cout << C(aa, x - 1) * f[aa] % MOD * C(bb, n - x) % MOD * f[bb] % MOD *
              f[n - aa - bb - 1] % MOD;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  solve();
}
