#include <bits/stdc++.h>
using namespace std;
const long long MOD = (long long)1e9 + 7;
long long A[1011];
long long F[1011][1011];
long long fact(long long x, long long k) {
  if (k == 0) return 1;
  if (F[x][k] != -1) return F[x][k];
  return F[x][k] = (x * fact(x - 1, k - 1)) % MOD;
}
signed main() {
  memset(F, -1, sizeof F);
  long long n, x, pos;
  cin >> n >> x >> pos;
  long long l = 0, r = n;
  while (l < r) {
    long long m = (l + r) >> 1;
    if (pos >= m) {
      A[m] = -1;
      l = m + 1;
    } else {
      A[m] = 1;
      r = m;
    }
  }
  long long low = 0;
  long long upp = 0;
  for (long long i = 0; i < n; i++) {
    if (i == pos) continue;
    if (A[i] < 0) low++;
    if (A[i] > 0) upp++;
  }
  long long ans = (fact(x - 1, low) * fact(n - x, upp)) % MOD;
  ans = (ans * fact(n - 1 - low - upp, n - 1 - low - upp)) % MOD;
  cout << ans << endl;
  return 0;
}
