#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9 + 7;
template <class T>
void dbs(string str, T t) {
  cout << str << " : " << t << endl;
}
template <class T, class... second>
void dbs(string str, T t, second... s) {
  int idx = str.find(',');
  cout << str.substr(0, idx) << " : " << t << ",";
  dbs(str.substr(idx + 1), s...);
}
template <class second, class T>
ostream& operator<<(ostream& os, const pair<second, T>& p) {
  return os << "(" << p.first << ", " << p.second << ")";
}
template <class T>
ostream& operator<<(ostream& os, const vector<T>& p) {
  os << "[ ";
  for (auto& it : p) os << it << " ";
  return os << "]";
}
template <class T>
ostream& operator<<(ostream& os, const set<T>& p) {
  os << "[ ";
  for (auto& it : p) os << it << " ";
  return os << "]";
}
template <class second, class T>
ostream& operator<<(ostream& os, const map<second, T>& p) {
  os << "[ ";
  for (auto& it : p) os << it << " ";
  return os << "]";
}
template <class T>
void prc(T a, T b) {
  cout << "[";
  for (T i = a; i != b; ++i) {
    if (i != a) cout << ", ";
    cout << *i;
  }
  cout << "]";
  cout << endl;
}
const int N = 1e5 + 10;
vector<int> g[N];
int dfsctr, root, child;
int dfs_num[N], dfs_low[N], is_art[N];
void dfs_pre(int u, int p) {
  dfs_num[u] = dfs_low[u] = dfsctr++;
  for (auto it : g[u]) {
    if (dfs_num[it] == -1) {
      if (u == root) ++child;
      dfs_pre(it, u);
      dfs_low[u] = min(dfs_low[u], dfs_low[it]);
      if (dfs_low[it] >= dfs_num[u]) is_art[u] = 1;
    } else if (p != it) {
      dfs_low[u] = min(dfs_low[u], dfs_num[it]);
    }
  }
}
void pre(int n) {
  dfsctr = 0;
  memset(dfs_num, -1, sizeof(dfs_num));
  for (auto i = (1); i <= (n); ++i)
    if (dfs_num[i] == -1) {
      root = i, child = 0;
      dfs_pre(root, -1);
      is_art[root] = child > 1;
    }
}
int p[N], vis[N], d[N];
int jump[21][N];
int lca(int u, int v) {
  if (d[u] < d[v]) swap(u, v);
  for (auto i = (20); i >= (0); --i)
    if (jump[i][u] and d[jump[i][u]] >= d[v]) u = jump[i][u];
  assert(d[u] == d[v]);
  if (u == v) return u;
  for (auto i = (20); i >= (0); --i)
    if (jump[i][u] and jump[i][v] and jump[i][u] != jump[i][v]) {
      u = jump[i][u];
      v = jump[i][v];
    }
  return p[u];
}
int get(int k, int u) {
  for (auto i = (0); i <= (20); ++i)
    if (k & (1 << i)) u = jump[i][u];
  return u;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n, m, q;
  cin >> n >> m >> q;
  while (m--) {
    int x, y;
    cin >> x >> y;
    g[x].push_back(y);
    g[y].push_back(x);
  }
  for (auto i = (1); i <= (n); ++i) sort((g[i]).begin(), (g[i]).end());
  pre(n);
  int r = 0;
  for (auto i = (1); i <= (n); ++i)
    if (is_art[i]) r = i;
  if (r) {
    p[r] = 0;
    vis[r] = 1;
    queue<int> q;
    q.push(r);
    while (!q.empty()) {
      int u = q.front();
      q.pop();
      for (int v : g[u])
        if (!vis[v]) {
          vis[v] = 1;
          d[v] = d[u] + 1;
          p[v] = u;
          q.push(v);
        }
    }
    for (auto i = (1); i <= (n); ++i) jump[0][i] = p[i];
    for (auto i = (1); i <= (20); ++i)
      for (auto j = (1); j <= (n); ++j)
        jump[i][j] = jump[i - 1][jump[i - 1][j]];
  }
  while (q--) {
    int a, b;
    cin >> a >> b;
    if (r == 0) {
      cout << "1\n";
    } else {
      int l = lca(a, b);
      if (a == l or b == l) {
        cout << d[a] + d[b] - 2 * d[l] << "\n";
      } else {
        int ans = d[a] + d[b] - 2 * d[l];
        int A = get(d[a] - d[l] - 1, a), B = get(d[b] - d[l] - 1, b);
        if (binary_search((g[A]).begin(), (g[A]).end(), B)) --ans;
        cout << ans << "\n";
      }
    }
  }
  return 0;
}
