#include <bits/stdc++.h>
using namespace std;
template <typename M, typename N>
istream& operator>>(istream& is, pair<M, N>& p) {
  is >> p.first >> p.second;
  return is;
}
template <typename M>
istream& operator>>(istream& is, vector<M>& v) {
  for (auto& it : v) is >> it;
  return is;
}
template <typename M>
istream& operator>>(istream& is, vector<vector<M>>& v) {
  for (auto& it : v) is >> it;
  return is;
}
template <typename M, typename N>
ostream& operator<<(ostream& os, const pair<M, N>& p) {
  os << p.first << ' ' << p.second << '\n';
  return os;
}
template <typename M>
ostream& operator<<(ostream& os, const vector<M>& v) {
  for (auto it : v) os << it << ' ';
  cout << '\n';
  return os;
}
template <typename M>
ostream& operator<<(ostream& os, const vector<vector<M>>& v) {
  for (auto it : v) os << it;
  return os;
}
const long double pi = acos(-1);
const long long inf = (long long)1e18 + 10;
const int mod = 1000000007;
long long n, m;
const int N = 2e5 + 10;
pair<int, int> s(int n, int x, int pos) {
  int left = 0;
  int right = n;
  pair<int, int> ans = {0, 0};
  while (left < right) {
    int middle = (left + right) >> 1;
    if (middle <= pos) {
      if (middle != pos) ans.first++;
      left = middle + 1;
    } else {
      ans.second++;
      right = middle;
    }
  }
  return ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, x, pos;
  cin >> n >> x >> pos;
  auto p = s(n, x, pos);
  if (n == 1) {
    cout << 1 << '\n';
    return 0;
  }
  long long l = x - 1, g = n - x;
  if (l < p.first || g < p.second) {
    cout << 0 << '\n';
    return 0;
  }
  int t = n - p.first - p.second - 1;
  long long ans = 1;
  for (int i = 0; i < p.first; i++) {
    (ans *= l) %= mod;
    l--;
  }
  for (int i = 0; i < p.second; i++) {
    (ans *= g) %= mod;
    g--;
  }
  while (t) {
    (ans *= t) %= mod;
    t--;
  }
  cout << ans << '\n';
  return 0;
}
