#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll MOD = 1000 * 1000 * 1000 + 7;
int n, x, pos;
void input() { cin >> n >> x >> pos; }
void solve() {
  ll res = 1;
  int le = x - 1;
  int ge = n - x;
  int left = 0, right = n, middle;
  while (left < right) {
    middle = (left + right) / 2;
    if (pos < middle) {
      res = (res * ge) % MOD;
      ge--;
      right = middle;
    } else {
      if (middle != pos) {
        res = (res * le) % MOD;
        le--;
      }
      left = middle + 1;
    }
  }
  for (int i = 1; i <= le + ge; i++) {
    res = (res * i) % MOD;
  }
  cout << res << "\n";
}
int main() {
  ios_base::sync_with_stdio(0);
  int t = 1;
  while (t--) {
    input();
    solve();
  }
  return 0;
}
