#include <bits/stdc++.h>
const int maxn = 1e5 + 10, maxm = 5e5 + 10;
struct Edge {
  int to, nxt;
} ed[maxm * 2];
int last[maxn];
int tote = 0;
void adde(int u, int v) {
  ed[++tote].to = v;
  ed[tote].nxt = last[u];
  last[u] = tote;
}
void adde2(int, int);
int dfstime, totc;
std::set<int> bcc[maxn * 2];
int sk[maxm * 2], dfn[maxn], low[maxn], top = 0;
void tarjan(int x) {
  low[x] = dfn[x] = ++dfstime;
  for (int i = last[x]; i > 0; i = ed[i].nxt)
    if (dfn[ed[i].to] == 0) {
      sk[++top] = i;
      tarjan(ed[i].to);
      low[x] = std::min(low[x], low[ed[i].to]);
      if (low[ed[i].to] >= dfn[x]) {
        ++totc;
        while (true) {
          if (bcc[totc].find(ed[sk[top]].to) == bcc[totc].end()) {
            adde2(totc, ed[sk[top]].to);
            bcc[totc].insert(ed[sk[top]].to);
          }
          if (sk[top] == i) {
            --top;
            break;
          }
          --top;
        }
      }
    } else if (dfn[ed[i].to] < dfn[x]) {
      low[x] = std::min(low[x], dfn[ed[i].to]);
      sk[++top] = i;
    }
}
std::vector<int> e2[maxn * 2];
int dep[maxn * 2], seq[maxn * 4], pos[maxn * 2], st[20][maxn * 4],
    lg2[maxn * 4];
void adde2(int u, int v) {
  e2[u].push_back(v);
  e2[v].push_back(u);
}
void dfs(int x) {
  seq[++dfstime] = x;
  pos[x] = dfstime;
  for (int i = 0; i < e2[x].size(); ++i)
    if (dep[e2[x][i]] == 0) {
      dep[e2[x][i]] = dep[x] + 1;
      dfs(e2[x][i]);
      seq[++dfstime] = x;
    }
}
int mindep(int u, int v) { return dep[u] < dep[v] ? u : v; }
int lca(int u, int v) {
  u = pos[u];
  v = pos[v];
  if (u > v) std::swap(u, v);
  int lglen = lg2[v - u + 1];
  return mindep(st[lglen][u], st[lglen][v - (1 << lglen) + 1]);
}
int askdis(int u, int v) { return dep[u] + dep[v] - 2 * dep[lca(u, v)]; }
int main() {
  int n, m, q;
  scanf("%d%d%d", &n, &m, &q);
  for (int i = 0; i < m; ++i) {
    int u, v;
    scanf("%d%d", &u, &v);
    adde(u, v);
    adde(v, u);
  }
  dfstime = 0;
  totc = n;
  for (int i = 1; i <= n; ++i)
    if (dfn[i] == 0) tarjan(i);
  int N = totc;
  dfstime = 0;
  for (int i = 1; i <= N; ++i)
    if (dep[i] == 0) {
      dep[i] = 1;
      dfs(i);
    }
  lg2[1] = 0;
  for (int i = 2; i <= dfstime; ++i)
    if ((i & (i - 1)) == 0)
      lg2[i] = lg2[i - 1] + 1;
    else
      lg2[i] = lg2[i - 1];
  for (int i = 1; i <= dfstime; ++i) st[0][i] = seq[i];
  for (int i = 1; i <= lg2[dfstime]; ++i)
    for (int j = 1; j <= dfstime; ++j)
      if (j + (1 << (i - 1)) <= dfstime)
        st[i][j] = mindep(st[i - 1][j], st[i - 1][j + (1 << (i - 1))]);
      else
        st[i][j] = st[i - 1][j];
  for (int i = 0; i < q; ++i) {
    int u, v;
    scanf("%d%d", &u, &v);
    printf("%d\n", askdis(u, v) / 2);
  }
  return 0;
}
