#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
int n, x, pos;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> x >> pos;
  int s = 0, b = 0;
  for (int l = 0, r = n; l < r;) {
    int m = (l + r) / 2;
    if (pos < m)
      r = m, b++;
    else
      l = m + 1, s++;
  }
  if (s > x || b > n - x) {
    cout << "0\n";
    return 0;
  }
  long long ans = 1;
  for (int i = x - 1; i >= x - s + 1; i--) {
    ans *= i;
    ans %= MOD;
  }
  for (int i = n - x; i >= n - x - b + 1; i--) {
    ans *= i;
    ans %= MOD;
  }
  for (int i = 1; i <= n - s - b; i++) {
    ans *= i;
    ans %= MOD;
  }
  cout << ans << '\n';
  return 0;
}
