#include <bits/stdc++.h>
using namespace std;
template <class T>
void in(T &x) {
  x = 0;
  bool f = 0;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') f = 1;
    c = getchar();
  }
  while ('0' <= c && c <= '9') {
    x = (x << 3) + (x << 1) + (c ^ 48);
    c = getchar();
  }
  if (f) x = -x;
}
int v[2000005], nx[2000005];
int head[1000005], cnte = 1;
inline void adde(int uu, int vv) {
  v[++cnte] = vv, nx[cnte] = head[uu];
  head[uu] = cnte;
}
vector<int> e[1000005];
int n, m, q;
int cnt;
int st[1000005], tp;
int dfn[1000005], low[1000005], dk;
void tarjan(int u, int fa) {
  dfn[u] = low[u] = ++dk;
  st[++tp] = u;
  for (register int i = head[u], vv; i; i = nx[i]) {
    vv = v[i];
    if (vv == fa) continue;
    if (!dfn[vv]) {
      tarjan(vv, u);
      low[u] = min(low[u], low[vv]);
      if (low[vv] >= dfn[u]) {
        ++cnt;
        int now;
        do {
          now = st[tp--];
          e[cnt].push_back(now);
          e[now].push_back(cnt);
        } while (now != vv);
        e[cnt].push_back(u);
        e[u].push_back(cnt);
      }
    } else
      low[u] = min(low[u], dfn[vv]);
  }
}
int fa[1000005], top[1000005], sz[1000005], hsn[1000005], dep[1000005];
void dfs(int x) {
  sz[x] = 1;
  for (register int i = 0, vv; i < e[x].size(); ++i) {
    vv = e[x][i];
    if (vv != fa[x]) {
      fa[vv] = x;
      dep[vv] = dep[x] + 1;
      dfs(vv);
      sz[x] += sz[vv];
      if (sz[vv] > sz[hsn[x]]) hsn[x] = vv;
    }
  }
}
void efs(int x) {
  if (hsn[x]) {
    top[hsn[x]] = top[x];
    efs(hsn[x]);
  }
  for (register int i = 0, vv; i < e[x].size(); ++i) {
    vv = e[x][i];
    if (vv != fa[x] && vv != hsn[x]) {
      top[vv] = vv;
      efs(vv);
    }
  }
}
inline int lca(int x, int y) {
  while (top[x] != top[y]) {
    if (dep[top[x]] < dep[top[y]]) swap(x, y);
    x = fa[top[x]];
  }
  return dep[x] < dep[y] ? x : y;
}
inline void prework() {
  cnt = n;
  tarjan(1, 0);
  dep[1] = fa[1] = top[1] = 1;
  dfs(1);
  efs(1);
}
signed main() {
  in(n), in(m);
  int q;
  in(q);
  for (register int i = 1, a, b; i <= m; ++i) {
    in(a), in(b);
    adde(a, b);
    adde(b, a);
  }
  prework();
  int x, y;
  while (q--) {
    in(x), in(y);
    printf("%d\n", (dep[x] + dep[y] - (dep[lca(x, y)] << 1)) >> 1);
  }
  return 0;
}
