#include <bits/stdc++.h>
using namespace std;
long long p[1005], c[1005], mod = 1e9 + 7;
int main() {
  long long n, x, pos;
  cin >> n >> x >> pos;
  for (long long i = 0; i < n; i++) {
    p[i] = i;
  }
  long long l = 0, r = n, numx = 0, numd = 0;
  while (l < r) {
    long long mid = (l + r) / 2;
    if (p[mid] <= pos) {
      c[mid] = 1;
      l = mid + 1;
    } else {
      c[mid] = 2;
      r = mid;
    }
  }
  for (long long i = 0; i < n; i++) {
    if (i == pos) continue;
    if (c[i] == 1) numx++;
    if (c[i] == 2) numd++;
  }
  if (numx <= x - 1 && numd <= n - x) {
    long long ans = 1, t = x - 1;
    for (long long i = 1; i <= numx; i++) {
      ans = ans * t;
      ans %= mod;
      t--;
    }
    t = n - x;
    for (long long i = 1; i <= numd; i++) {
      ans *= t;
      ans %= mod;
      t--;
    }
    for (long long i = 1; i <= n - numx - numd - 1; i++) {
      ans *= i;
      ans %= mod;
    }
    cout << ans << endl;
  } else {
    cout << 0 << endl;
    return 0;
  }
}
