#include <bits/stdc++.h>
using namespace std;
int mod = 1000000007;
const int inf = 1034567891;
const long long LL_INF = 1234567890123456789ll;
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  cout << name << " : " << arg1 << '\n';
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cout.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
template <typename T>
T GCD(T a, T b) {
  long long t;
  while (a) {
    t = a;
    a = b % a;
    b = t;
  }
  return b;
}
template <typename T>
string toString(T a) {
  return to_string(a);
}
template <typename T>
void toInt(string s, T& x) {
  stringstream str(s);
  str >> x;
}
inline int add(int x, int y) {
  x += y;
  if (x >= mod) x -= mod;
  return x;
}
inline int sub(int x, int y) {
  x -= y;
  if (x < 0) x += mod;
  return x;
}
inline int mul(int x, int y) { return (x * 1ll * y) % mod; }
inline int powr(int a, long long b) {
  int x = 1 % mod;
  while (b) {
    if (b & 1) x = mul(x, a);
    a = mul(a, a);
    b >>= 1;
  }
  return x;
}
inline int inv(int a) { return powr(a, mod - 2); }
const int N = 1005;
int m;
vector<int> need;
int dp[32][N][N][2];
int fun(int ind, int small, int greater, int e) {
  if (ind == m) {
    return 1;
  }
  if (~dp[ind][small][greater][e]) return dp[ind][small][greater][e];
  int ans = 0;
  if (need[ind] == 2) {
    ans = add(ans, fun(ind + 1, small, greater, 0));
  } else if (need[ind] == 0) {
    for (int i = 0; i < small; i++) {
      ans = add(ans, fun(ind + 1, small - 1, greater, e));
    }
  } else {
    for (int i = 0; i < greater; i++) {
      ans = add(ans, fun(ind + 1, small, greater - 1, e));
    }
  }
  return dp[ind][small][greater][e] = ans;
}
int fact[N];
void pre() {
  fact[0] = 1;
  for (int i = 1; i < N; i++) {
    fact[i] = mul(fact[i - 1], i);
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  pre();
  int n, x, pos;
  cin >> n >> x >> pos;
  int low = 0, high = n, mid;
  while (low < high) {
    mid = (low + high) / 2;
    if (mid == pos) {
      need.push_back(2);
      low = mid + 1;
      continue;
    }
    if (pos >= mid) {
      need.push_back(0);
      low = mid + 1;
    } else {
      need.push_back(1);
      high = mid;
    }
  }
  m = need.size();
  memset(dp, -1, sizeof(dp));
  int ans = fun(0, x - 1, n - x, 1);
  ans = mul(ans, fact[n - m]);
  cout << ans << '\n';
  return 0;
}
