#include <bits/stdc++.h>
#pragma gcc optimize("O3")
using namespace std;
const int FUsize = 100005, lg = 19;
struct wie {
  int ojc;
} FU[FUsize];
void FUinit() {
  for (int i = 0; i < FUsize; i++) {
    FU[i].ojc = i;
  }
}
int FUfnd(int x) {
  if (FU[x].ojc == x) {
    return x;
  }
  return FU[x].ojc = FUfnd(FU[x].ojc);
}
int FUuni(int a, int b) {
  int fa = FUfnd(a);
  int fb = FUfnd(b);
  if (fa != fb) {
    FU[fa].ojc = fb;
    return 1;
  }
  return 0;
}
vector<int> pol[100005];
int lca[100005][lg];
int dep[100005];
void dfs(int v, int p) {
  int i, u, j;
  for (i = 0; i < pol[v].size(); i++) {
    u = pol[v][i];
    if (u == p) {
      continue;
    }
    if (lca[u][0] != 0 && u != 1) {
      FUuni(u, v);
      continue;
    }
    dep[u] = dep[v] + 1;
    lca[u][0] = v;
    for (j = 1; j < lg; j++) {
      lca[u][j] = lca[lca[u][j - 1]][j - 1];
    }
  }
  for (i = 0; i < pol[v].size(); i++) {
    u = pol[v][i];
    if (lca[u][0] == v) {
      dfs(u, v);
    }
  }
}
int lcca(int a, int b) {
  if (dep[a] < dep[b]) {
    swap(a, b);
  }
  int j, i, wyn = 0;
  for (i = lg - 1; i >= 0; i--) {
    if (dep[a] - dep[b] >= (1 << i)) {
      wyn += (1 << i);
      a = lca[a][i];
    }
  }
  if (a == b) {
    return wyn;
  }
  for (i = lg - 1; i >= 0; i--) {
    if (lca[a][i] != lca[b][i]) {
      wyn += (1 << (i + 1));
      a = lca[a][i];
      b = lca[b][i];
    }
  }
  if (FUfnd(a) == FUfnd(b)) {
    return wyn + 1;
  }
  return wyn + 2;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int a, b, i, j, n, m, q;
  FUinit();
  cin >> n >> m >> q;
  for (i = 0; i < m; i++) {
    cin >> a >> b;
    pol[a].push_back(b);
    pol[b].push_back(a);
  }
  dfs(1, 0);
  while (q--) {
    cin >> a >> b;
    cout << lcca(a, b) << "\n";
  }
}
