#include <bits/stdc++.h>
using namespace std;
bool com(pair<int, int> x, pair<int, int> y) { return x.first < y.first; }
long long int power(long long int x, long long int y) {
  long long int prod = 1;
  while (y) {
    if (y & 1) prod = (prod * x) % 1000000007;
    x = (x * x) % 1000000007;
    y /= 2;
  }
  return prod;
}
const int N = 1e5 + 9;
void solve() {
  long long int n, x, pos;
  cin >> n >> x >> pos;
  long long int ans = 1;
  long long int left = 0, right = 0;
  long long int l = 0, r = n;
  while (l < r) {
    long long int mid = (l + r) / 2;
    if (mid > pos) {
      right++;
      r = mid;
    } else if (mid < pos) {
      left++;
      l = mid + 1;
    } else
      l = mid + 1;
  }
  if (l - 1 != pos) {
    cout << 0;
    return;
  }
  long long int y = n - (left + right + 1);
  long long int z = x - 1;
  while (left) {
    ans = (ans * z) % 1000000007;
    z--;
    left--;
  }
  z = n - x;
  while (right) {
    ans = (ans * z) % 1000000007;
    z--;
    right--;
  }
  while (y) {
    ans = (ans * y) % 1000000007;
    y--;
  }
  cout << ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  while (t--) solve();
  return 0;
}
