#include <bits/stdc++.h>
const int Maxn = 100005;
int n, m, q, nowtime;
std::vector<int> g[Maxn];
bool vis[Maxn];
int start[Maxn], finish[Maxn];
int lev[Maxn], dep[17][Maxn];
inline bool is_ancestor(int u, int v) {
  return start[u] <= start[v] && finish[v] <= finish[u];
}
void dfs(int u) {
  start[u] = ++nowtime;
  vis[u] = 1;
  dep[0][u] = u;
  for (int i = 0; i < g[u].size(); ++i) {
    int v = g[u][i];
    if (vis[v] && lev[v] < lev[dep[0][u]])
      dep[0][u] = v;
    else if (!vis[v]) {
      lev[v] = lev[u] + 1;
      dfs(v);
    }
  }
  finish[u] = nowtime;
}
int work(int u, int v) {
  int ans = 0;
  if (!is_ancestor(u, v)) {
    for (int i = 16; i >= 0; --i) {
      if (!is_ancestor(dep[i][u], v)) {
        u = dep[i][u];
        ans += (1 << i);
      }
    }
    u = dep[0][u];
    ans++;
  }
  if (!is_ancestor(v, u)) {
    for (int i = 16; i >= 0; --i) {
      if (!is_ancestor(dep[i][v], u)) {
        v = dep[i][v];
        ans += (1 << i);
      }
    }
    v = dep[0][v];
    ans++;
  }
  return ans;
}
void lca_init() {
  dfs(1);
  for (int i = 1; i <= 16; ++i)
    for (int j = 1; j <= n; ++j) dep[i][j] = dep[i - 1][dep[i - 1][j]];
}
int main() {
  scanf("%d%d%d", &n, &m, &q);
  for (int u, v; m--;) {
    scanf("%d%d", &u, &v);
    g[u].push_back(v);
    g[v].push_back(u);
  }
  lca_init();
  for (int u, v; q--;) {
    scanf("%d%d", &u, &v);
    int ans1 = work(u, v), ans2 = work(v, u);
    printf("%d\n", ans1 < ans2 ? ans1 : ans2);
  }
  return 0;
}
