#include <bits/stdc++.h>
using namespace std;
const long double PI = acos(-1);
long long int M = 1000000007;
long long int power(long long int b, long long int e, long long int m) {
  if (e == 0) return 1;
  if (e & 1) return b * power((b * b) % m, e / 2, m) % m;
  return power((b * b) % m, e / 2, m);
}
long long int power(long long int b, long long int e) {
  if (e == 0) return 1;
  if (e & 1) return b * power(b * b, e / 2);
  return power(b * b, e / 2);
}
bool isPrime(long long int n) {
  if (n <= 1) return false;
  if (n <= 3) return true;
  if (n % 2 == 0 || n % 3 == 0) return false;
  for (int i = 5; i * i <= n; i = i + 6)
    if (n % i == 0 || n % (i + 2) == 0) return false;
  return true;
}
long long int inv[1005], fac_inv[1005], fac[1005], sum[1005];
void initialize(long long int n) {
  long long int i;
  inv[1] = 1;
  for (i = 2; i <= n; i++) {
    inv[i] = (M - M / i) * inv[M % i] % M;
  }
  fac[0] = fac[1] = 1;
  for (i = 2; i <= n; i++) {
    fac[i] = (i * fac[i - 1]) % M;
  }
  fac_inv[0] = fac_inv[1] = 1;
  for (i = 2; i <= n; i++) {
    fac_inv[i] = (inv[i] * fac_inv[i - 1]) % M;
  }
}
long long int ncr(long long int n, long long int r) {
  if (n < r) return 0;
  return (fac[n] * fac_inv[r] % M) * fac_inv[n - r] % M;
}
void Its_time_to_go_in_loop() {
  long long int n, x, pos;
  cin >> n >> x >> pos;
  long long int left, right, m;
  left = 0;
  right = n;
  long long int mn, mx;
  mn = x - 1;
  mx = n - x;
  long long int ans = 0;
  while (left < right) {
    m = (left + right) / 2;
    if (pos == m) {
      left = m + 1;
    }
    if (pos > m) {
      if (mn <= 0) {
        cout << "0\n";
        return;
      }
      mn--;
      left = m + 1;
    } else if (pos < m) {
      if (mx <= 0) {
        cout << "0\n";
        return;
      }
      mx--;
      right = m;
    }
  }
  long long int a, b;
  a = x - 1 - mn;
  b = n - x - mx;
  ans = 1;
  ans = ((((ncr(x - 1, a) % M)))) % M;
  ans = (ans * ((fac[a]) % M)) % M;
  ans = (ans * ((ncr(n - x, b) % M))) % M;
  ans = (ans * ((fac[b]) % M)) % M;
  ans = (ans * (fac[n - 1 - a - b] % M)) % M;
  cout << ans << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  long long int t = 1;
  initialize(1001);
  while (t--) {
    Its_time_to_go_in_loop();
  }
  return 0;
}
