#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  long long n, x, p;
  cin >> n >> x >> p;
  long long a = 0, b = 0;
  long long l = 0, r = n;
  while (l < r) {
    long long m = (l + r) / 2;
    if (m <= p) {
      a++;
      l = m + 1;
    } else {
      b++;
      r = m;
    }
  }
  a--;
  long long c = x - 1;
  long long d = n - x;
  if (a > c || b > d) {
    cout << 0 << "\n";
    return 0;
  }
  long long ans = 1;
  for (long long i = 0; i < a; i++) {
    ans = (((ans % 1000000007) * (c % 1000000007))) % 1000000007;
    c--;
  }
  for (long long i = 0; i < b; i++) {
    ans = (((ans % 1000000007) * (d % 1000000007))) % 1000000007;
    d--;
  }
  long long k = c + d;
  while (k > 0) {
    ans = (((ans % 1000000007) * (k % 1000000007))) % 1000000007;
    k--;
  }
  cout << ans % 1000000007 << "\n";
}
