#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 5;
vector<long long> g[N];
long long up[N][20], tr[N][20];
long long h[N];
long long t;
long long tin[N], tout[N];
void dfs(long long u, long long p = 0) {
  h[u] = h[p] + 1;
  tin[u] = ++t;
  tr[u][0] = p;
  up[u][0] = p;
  for (long long v : g[u]) {
    if (v == p) continue;
    if (h[v] && h[v] < h[up[u][0]]) up[u][0] = v;
    if (!h[v]) dfs(v, u);
  }
  tout[u] = ++t;
}
bool upper(long long v, long long u) {
  return tin[v] <= tin[u] && tout[v] >= tout[u];
}
long long lca2(long long v, long long u) {
  if (upper(v, u)) return v;
  if (upper(u, v)) return u;
  for (long long i = 19; i > -1; --i)
    if (!upper(tr[v][i], u)) v = tr[v][i];
  return tr[v][0];
}
long long lca(long long u, long long v) {
  if (h[u] > h[v]) swap(u, v);
  for (long long i = 0; h[v] - h[u]; ++i)
    if ((1 << i) & (h[v] - h[u])) v = tr[v][i];
  if (u == v) return u;
  for (long long i = 18; i > -1; --i) {
    if (tr[u][i] == tr[v][i]) continue;
    u = tr[u][i];
    v = tr[v][i];
  }
  return tr[u][0];
}
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n, m, q;
  cin >> n >> m >> q;
  for (long long i = 0; i < m; ++i) {
    long long fr, to;
    cin >> fr >> to;
    g[fr].push_back(to);
    g[to].push_back(fr);
  }
  dfs(1);
  for (long long i = 1; i < 20; ++i)
    for (long long v = 1; v <= n; ++v) {
      up[v][i] = up[up[v][i - 1]][i - 1];
      tr[v][i] = tr[tr[v][i - 1]][i - 1];
    }
  while (q--) {
    long long u, v, ans = 0;
    cin >> u >> v;
    long long p = lca(u, v);
    if (p != u) {
      ++ans;
      for (long long i = 19; i > -1; --i)
        if (h[up[u][i]] > h[p]) {
          u = up[u][i];
          ans += (1 << i);
        }
    }
    if (p != v) {
      ++ans;
      for (long long i = 19; i > -1; --i)
        if (h[up[v][i]] > h[p]) {
          v = up[v][i];
          ans += (1 << i);
        }
    }
    cout << ans << "\n";
  }
  return 0;
}
