#include <bits/stdc++.h>
using namespace std;
void fast() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
}
long long a[10005], mod = 1000000007;
void check(long long n) {
  a[0] = 1;
  for (long long i = 1; i <= n; i++) {
    a[i] = (a[i - 1] * i) % mod;
  }
}
int main() {
  long long n, x, pos, ans = 1;
  cin >> n >> x >> pos;
  check(n);
  long long b = n - x, c = x - 1, l = 0, r = n, mid;
  while (l < r) {
    mid = (l + r) / 2;
    if (mid == pos) {
      l = mid + 1;
    } else if (mid < pos) {
      l = mid + 1;
      ans = (ans * c) % mod;
      --c;
    } else {
      r = mid;
      ans = (ans * b) % mod;
      --b;
    }
  }
  if (c < 0 || b < 0)
    cout << "0\n";
  else {
    ans = (ans * a[c + b]) % mod;
    cout << ans << endl;
  }
  return 0;
}
