#include <bits/stdc++.h>
using namespace std;
const int N = 100100, L = 18;
int n, m, Q;
int dep[N], p[N][L];
set<int> adj[N];
map<int, int> mp[N];
int get(int par, int i) {
  if (mp[par][i] == i) return i;
  return mp[par][i] = get(par, mp[par][i]);
}
void mrg(int par, int u, int v) {
  u = get(par, u);
  v = get(par, v);
  if (u == v) return;
  if (rand() & 1) swap(u, v);
  mp[par][u] = mp[par][v];
}
int LCA(int u, int v) {
  if (u == v) return 0;
  int u0 = u, v0 = v;
  if (dep[u] < dep[v]) swap(u, v);
  int k = dep[u] - dep[v];
  for (int i = 0; i < L; i++)
    if (k & (1 << i)) u = p[u][i];
  if (u == v) return k;
  for (int i = L - 1; i >= 0; i--)
    if (p[u][i] != p[v][i]) u = p[u][i], v = p[v][i];
  int ret = dep[u0] + dep[v0] - 2 * dep[p[u][0]];
  int par = p[u][0];
  if (get(par, u) == get(par, v)) ret--;
  return ret;
}
int main() {
  srand(time(0));
  scanf("%d %d %d", &n, &m, &Q);
  for (int i = 1; i <= m; i++) {
    int u, v;
    scanf("%d %d", &u, &v);
    adj[u].insert(v);
    adj[v].insert(u);
  }
  queue<int> q;
  q.push(1);
  dep[1] = 1;
  p[1][0] = 0;
  while (!q.empty()) {
    int u = q.front();
    q.pop();
    for (auto v : adj[u]) mp[u][v] = v;
    for (auto v : adj[u]) {
      if (p[u][0] == v) continue;
      if (dep[v]) {
        mrg(p[u][0], u, v);
        continue;
      }
      dep[v] = 1 + dep[u];
      p[v][0] = u;
      for (int i = 1; i < L; i++) p[v][i] = p[p[v][i - 1]][i - 1];
      q.push(v);
    }
  }
  while (Q--) {
    int u, v;
    scanf("%d %d", &u, &v);
    printf("%d\n", LCA(u, v));
  }
  return 0;
}
