#include <bits/stdc++.h>
using namespace std;
int p[100010][21], d[100010], low[100010];
bool v[100010], art[100010];
map<int, int> adj[100010];
vector<int> hey[100010];
queue<int> que;
int lcafind(int xx, int yy, int maxpo) {
  int x = xx, y = yy;
  int dif;
  if (d[x] > d[y]) {
    dif = d[x] - d[y];
    int cur = 0;
    while (dif) {
      if (dif & (1 << cur)) {
        x = p[x][cur];
        dif -= 1 << cur;
      }
      cur++;
    }
  } else {
    dif = d[y] - d[x];
    int cur = 0;
    while (dif) {
      if (dif & (1 << cur)) {
        y = p[y][cur];
        dif -= 1 << cur;
      }
      cur++;
    }
  }
  if (x == y) return abs(d[xx] - d[yy]);
  int po = maxpo;
  while (po >= 0) {
    if (p[x][po] != p[y][po]) {
      x = p[x][po];
      y = p[y][po];
    }
    po--;
  }
  if (adj[x][y] == 1)
    return d[xx] - d[x] + d[yy] - d[y] + 1;
  else
    return d[xx] - d[x] + d[yy] - d[y] + 2;
}
int main() {
  int n, m, q;
  scanf("%d %d %d", &n, &m, &q);
  for (int i = 0; i < m; i++) {
    int x, y;
    scanf("%d %d", &x, &y);
    adj[x][y] = 1;
    adj[y][x] = 1;
    hey[x].push_back(y);
    hey[y].push_back(x);
  }
  d[1] = 0;
  v[1] = true;
  que.push(1);
  while (!que.empty()) {
    int x = que.front();
    que.pop();
    for (int y : hey[x])
      if (!v[y]) {
        d[y] = d[x] + 1;
        v[y] = true;
        p[y][0] = x;
        que.push(y);
      }
  }
  int maxd = 0, maxpo = -1;
  for (int i = 1; i <= n; i++) {
    maxd = max(maxd, d[i]);
  }
  while (1 << (maxpo + 1) <= maxd) {
    maxpo++;
  }
  for (int j = 1; (1 << j) <= maxd; j++)
    for (int i = 1; i <= n; i++) p[i][j] = p[p[i][j - 1]][j - 1];
  while (q--) {
    int x, y;
    scanf("%d %d", &x, &y);
    printf("%d\n", lcafind(x, y, maxpo));
  }
}
