#include <bits/stdc++.h>
using namespace std;
template <typename T, typename S>
ostream& operator<<(ostream& os, const pair<T, S>& v) {
  os << '(' << v.first << ' ' << v.second << ')';
  return os;
}
template <typename T>
ostream& operator<<(ostream& os, const vector<T>& v) {
  int cnt = 0;
  for (auto it : v) {
    cnt != v.size() - 1 ? os << it << ' ' : os << it;
    cnt++;
  }
  return os;
}
template <typename T>
ostream& operator<<(ostream& os, const set<T>& v) {
  int cnt = 0;
  for (auto it : v) {
    cnt != v.size() - 1 ? os << it << ' ' : os << it;
    cnt++;
  }
  return os;
}
template <typename T, typename S>
ostream& operator<<(ostream& os, const map<T, S>& v) {
  int cnt = 0;
  for (auto it : v) {
    cnt != v.size() - 1 ? os << it << ' ' : os << it;
    cnt++;
  }
  return os;
}
template <typename T, typename S>
ostream& operator<<(ostream& os, const unordered_map<T, S>& v) {
  int cnt = 0;
  for (auto it : v) {
    cnt != v.size() - 1 ? os << it << ' ' : os << it;
    cnt++;
  }
  return os;
}
template <typename T>
void print(T var1) {
  cout << var1 << '\n';
}
template <typename T, typename... Types>
void print(T var1, Types... var2) {
  cout << var1 << ' ';
  print(var2...);
}
template <typename T>
T Max(T x) {
  return x;
}
template <typename T, typename... Types>
T Max(T var1, Types... var2) {
  return var1 >= Max(var2...) ? var1 : Max(var2...);
}
template <typename T>
T Min(T x) {
  return x;
}
template <typename T, typename... Types>
T Min(T var1, Types... var2) {
  return var1 <= Min(var2...) ? var1 : Min(var2...);
}
long long INF = 1000000000ll;
void solve();
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t = 1;
  while (t--) {
    solve();
  }
  cerr << "time taken : " << (float)clock() / CLOCKS_PER_SEC << " secs\n";
  return 0;
}
long long power(long long x, long long y, long long p = 1000000007) {
  long long res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
long long inverse(long long a, long long m = 1000000007) {
  return power(a, m - 2, m);
}
long long fact(long long x) {
  long long ans = 1;
  for (long long i = 1; i < x + 1; i++) {
    ans = (ans * i) % 1000000007;
  }
  return ans;
}
void solve() {
  long long n, x, pos = 0, ans = 4;
  cin >> n >> x >> pos;
  vector<long long> vis(n, 0);
  long long left = 0;
  long long right = n;
  bool found = false;
  while (left < right) {
    long long mid = (left + right) / 2;
    if (found) {
      vis[mid] = 1;
    }
    if (pos < mid) {
      vis[mid] = 1;
      right = mid;
    }
    if (pos > mid) {
      vis[mid] = -1;
      left = mid + 1;
    }
    if (pos == mid) {
      found = true;
      left = mid + 1;
    }
  }
  long long sm = 0;
  long long bg = 0;
  for (long long i = 0; i < n; i++) {
    if (vis[i] > 0) bg++;
    if (vis[i] < 0) sm++;
  }
  if (sm >= x || bg > (n - x)) {
    print(0);
    return;
  }
  ans = (fact(n - 1 - sm - bg) * fact(x - 1)) % 1000000007;
  ans = (ans * inverse(fact(x - 1 - sm))) % 1000000007;
  ans = (ans * fact(n - x)) % 1000000007;
  ans = (ans * inverse(fact(n - x - bg))) % 1000000007;
  print(ans);
}
