#include <bits/stdc++.h>
using namespace std;
const long double eps = 1e-13;
const long double PI = acos(-1);
const int INF = (int)1e9;
const long long INFF = (long long)1e18;
const int mod = (int)1e9 + 7;
const int MXN = (int)1e5 + 7;
int n, m, q;
vector<int> edge[MXN];
void init() {
  scanf("%d %d %d", &n, &m, &q);
  for (int i = 1; i < m + 1; i++) {
    int u, v;
    scanf("%d %d", &u, &v);
    edge[u].push_back(v);
    edge[v].push_back(u);
  }
  return;
}
int dep[MXN];
int prt[20][MXN], up[20][MXN];
void dfs(int u, int pa) {
  dep[u] = dep[pa] + 1;
  prt[0][u] = up[0][u] = pa;
  for (int v : edge[u]) {
    if (v == pa) continue;
    if (dep[v] && dep[v] < dep[up[0][u]]) up[0][u] = v;
    if (!dep[v]) dfs(v, u);
  }
  return;
}
int lca(int u, int v) {
  if (dep[u] > dep[v]) swap(u, v);
  for (int i = 0; dep[v] - dep[u]; ++i)
    if ((1 << i) & (dep[v] - dep[u])) v = prt[i][v];
  if (u == v) return u;
  for (int i = 18; i >= 0; i--) {
    if (prt[i][u] == prt[i][v]) continue;
    u = prt[i][u];
    v = prt[i][v];
  }
  return prt[0][u];
}
void sol() {
  dfs(1, 0);
  for (int i = 1; i < 19; i++)
    for (int j = 1; j < n + 1; j++) {
      up[i][j] = up[i - 1][up[i - 1][j]];
      prt[i][j] = prt[i - 1][prt[i - 1][j]];
    }
  while (q--) {
    int u, v;
    scanf("%d %d", &u, &v);
    int p = lca(u, v);
    int ans = 0;
    if (u != p) {
      for (int i = 18; i >= 0; i--)
        if (dep[up[i][u]] > dep[p]) {
          u = up[i][u];
          ans += 1 << i;
        }
      ans++;
    }
    if (v != p) {
      for (int i = 18; i >= 0; i--)
        if (dep[up[i][v]] > dep[p]) {
          v = up[i][v];
          ans += 1 << i;
        }
      ans++;
    }
    printf("%d\n", ans);
  }
  return;
}
int main(void) {
  init();
  sol();
  return 0;
}
