#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline bool upmin(T &x, T y) {
  return y < x ? x = y, 1 : 0;
}
template <typename T>
inline bool upmax(T &x, T y) {
  return x < y ? x = y, 1 : 0;
}
const long double eps = 1e-11;
const long double pi = acos(-1);
const int oo = 1 << 30;
const long long loo = 1ll << 62;
const int mods = 1e9 + 7;
const int MAXN = 600005;
const int INF = 0x3f3f3f3f;
inline int read() {
  int f = 1, x = 0;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    x = (x << 3) + (x << 1) + (c ^ 48);
    c = getchar();
  }
  return x * f;
}
vector<int> e[MAXN], E[MAXN];
int stk[MAXN], low[MAXN], sz[MAXN], fa[MAXN], top[MAXN], mx[MAXN], dfn[MAXN],
    dep[MAXN], num = 0, DFN = 0, Top = 0, n, m;
void add(int u, int v) { E[u].push_back(v), E[v].push_back(u); }
void dfs(int x, int father) {
  dfn[x] = low[x] = ++DFN, stk[++Top] = x;
  for (auto v : e[x]) {
    if (v == father) continue;
    if (!dfn[v]) {
      dfs(v, x);
      upmin(low[x], low[v]);
      if (low[v] >= dfn[x]) {
        num++;
        add(x, num + n);
        int y;
        while (y = stk[Top--]) {
          add(y, num + n);
          if (y == v) break;
        }
      }
    } else
      upmin(low[x], dfn[v]);
  }
}
void dfs1(int x, int father) {
  dep[x] = dep[father] + 1, sz[x] = 1, fa[x] = father;
  for (auto v : E[x]) {
    if (v == father) continue;
    dfs1(v, x);
    sz[x] += sz[v];
    if (sz[v] > sz[mx[x]]) mx[x] = v;
  }
}
void dfs2(int x, int Top) {
  top[x] = Top;
  if (mx[x]) dfs2(mx[x], Top);
  for (auto v : E[x]) {
    if (v == fa[x] || v == mx[x]) continue;
    dfs2(v, v);
  }
}
int getlca(int u, int v) {
  while (top[u] != top[v]) {
    if (dep[top[u]] < dep[top[v]]) swap(u, v);
    u = fa[top[u]];
  }
  return dep[u] < dep[v] ? u : v;
}
signed main() {
  n = read(), m = read();
  int Case = read();
  for (int i = 1, u, v; i <= m; i++)
    u = read(), v = read(), e[u].push_back(v), e[v].push_back(u);
  dfs(1, 0);
  dfs1(1, 0);
  dfs2(1, 1);
  while (Case--) {
    int u = read(), v = read(), lca = getlca(u, v);
    printf("%d\n", (dep[u] + dep[v] - dep[lca] * 2) / 2);
  }
  return 0;
}
