#include <bits/stdc++.h>
using namespace std;
int n, m, q, x, y, ans;
int H[200000], h[200000], F[200000], f[200000][18];
vector<int> P[200000];
map<int, bool> p[200000];
void bd(int x) {
  for (auto i : P[x])
    if (i != F[x]) {
      if (!H[i]) {
        H[i] = H[x] + 1;
        F[i] = x;
        bd(i);
      }
      if (H[i] < H[f[x][0]]) f[x][0] = i;
      if (H[x] < H[f[i][0]]) f[i][0] = x;
    }
}
void dfs(int x) {
  h[x] = h[f[x][0]] + 1;
  for (auto i : P[x])
    if (!h[i]) dfs(i);
}
int main() {
  scanf("%d%d%d", &n, &m, &q);
  for (int i = (1); i <= (n); i++) f[i][0] = i;
  for (int i = (1); i <= (m); i++) {
    scanf("%d%d", &x, &y);
    P[x].push_back(y);
    P[y].push_back(x);
    p[x][y] = 1;
    p[y][x] = 1;
  }
  H[1] = 1;
  f[1][0] = 1;
  bd(1);
  dfs(1);
  for (int j = (1); j <= (17); j++)
    for (int i = (1); i <= (n); i++) f[i][j] = f[f[i][j - 1]][j - 1];
  for (int i = (1); i <= (q); i++) {
    ans = 0;
    scanf("%d%d", &x, &y);
    if (h[x] < h[y]) swap(x, y);
    for (int j = (17); j >= (0); j--)
      if (h[x] - (1 << j) >= h[y]) ans += 1 << j, x = f[x][j];
    for (int j = (17); j >= (0); j--)
      if (f[x][j] != f[y][j]) ans += 1 << (j + 1), x = f[x][j], y = f[y][j];
    if (x != y) {
      if (p[x].count(y))
        ans++;
      else
        ans += 2;
    }
    printf("%d\n", ans);
  }
}
