#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const int MAXN = 1000 + 9;
int a[MAXN];
long long A(int n, int m) {
  long long res = 1;
  for (int i = n; i >= n - m + 1; --i) res = res * i % MOD;
  return res;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.precision(6);
  cout << fixed;
  int n, x, pos;
  cin >> n >> x >> pos;
  int left = 0, right = n;
  while (left < right) {
    int m = (left + right) / 2;
    if (m == pos) {
      left = m + 1;
      continue;
    }
    if (m < pos) {
      a[m] = -1;
      left = m + 1;
    } else {
      a[m] = 1;
      right = m;
    }
  }
  if (left - 1 != pos) {
    cout << 0 << endl;
    return 0;
  }
  int a0 = 0, a1 = 0;
  for (int i = 0; i < n; ++i) {
    if (i == pos) continue;
    if (a[i] == 1) ++a1;
    if (a[i] == -1) ++a0;
  }
  if (n - x < a1 || x - 1 < a0) {
    cout << 0 << endl;
    return 0;
  }
  long long ans = A(n - x, a1) * A(x - 1, a0) % MOD *
                  A(n - a1 - a0 - 1, n - a1 - a0 - 1) % MOD;
  cout << ans << endl;
  return 0;
}
