#include <bits/stdc++.h>
using namespace std;
long long oll = 0;
bool comp(const pair<int, int> &a, const pair<int, int> &b) {
  return a.first < b.first;
}
long long mod = 1e9 + 7;
long long fact(long long n) {
  long long ret = 1;
  for (long long i = 1; i < n + 1; i++) {
    ret = (ret * i) % mod;
  }
  return ret;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, x, pos;
  cin >> n >> x >> pos;
  vector<int> perm;
  int lo = 0, hi = n;
  int chk = pos, sm_c = 0, big_c = 0;
  while (lo < hi) {
    int mid = (lo + hi) / 2;
    if (mid > chk) {
      hi = mid;
      perm.push_back(+1);
      big_c++;
    } else if (mid <= chk) {
      lo = mid + 1;
      if (lo - 1 == pos) continue;
      perm.push_back(-1);
      sm_c++;
    }
  }
  long long ans = 1;
  int smol = (x - 1), big = n - x;
  if (smol < sm_c || big < big_c) {
    cout << 0 << "\n";
    return 0;
  }
  for (long long i = 0; i < perm.size(); i++) {
    if (perm[i] == 1)
      ans = (ans * big--) % mod;
    else
      ans = (ans * smol--) % mod;
  }
  ans = (ans * fact(max(0, smol + big))) % mod;
  cout << ans << "\n";
  return 0;
}
