#include <bits/stdc++.h>
using namespace std;
vector<int> c[1000];
int C(int n, int m) {
  if (c[n][m]) return c[n][m];
  return c[n][m] = (C(n - 1, m - 1) + C(n - 1, m)) % 1000000007;
}
int L, R, n, x, pos;
void cal(int l, int r) {
  while (l < r) {
    if (pos < (l + r) / 2) {
      R++;
      r = (l + r) / 2;
    } else {
      if (pos != (l + r) / 2) L++;
      l = (l + r) / 2 + 1;
    }
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  for (int i = 0; i < 1000; i++) {
    c[i].resize(i + 1);
    c[i][0] = c[i][i] = 1;
  }
  cin >> n >> x >> pos;
  cal(0, n);
  if (x - 1 < L || n - x < R)
    cout << 0;
  else {
    long long ans = (1ll * C(x - 1, L) * C(n - x, R)) % 1000000007;
    for (int i = 1; i < n - L - R; i++) ans = (ans * i) % 1000000007;
    for (int i = 1; i <= L; i++) ans = (ans * i) % 1000000007;
    for (int i = 1; i <= R; i++) ans = (ans * i) % 1000000007;
    cout << ans;
  }
}
