#include <bits/stdc++.h>
using namespace std;
long long n, x, pos, ans = 1;
const long long mod = 1e9 + 7;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n >> x >> pos;
  vector<pair<int, int> > p;
  int l = 0, r = n;
  while (l < r) {
    int m = (l + r) / 2;
    if (m <= pos) {
      p.push_back({m, 0});
      l = m + 1;
    } else {
      p.push_back({m, 1});
      r = m;
    }
  }
  long long smaller = x - 1;
  long long bigger = n - x;
  for (auto a : p) {
    if (a.second == 1) {
      ans = (ans * bigger) % mod;
      bigger--;
    } else if (a.first != pos) {
      ans = (ans * smaller) % mod;
      smaller--;
    }
  }
  for (long long i = 1; i <= bigger + smaller; i++) ans = ans * i % mod;
  cout << ans;
}
