#include <bits/stdc++.h>
using namespace std;
int N, M, Q, Level[100005], Log[100005];
vector<int> G[100005];
queue<int> Queue;
int Father[20][100005];
void Read() {
  scanf("%d%d%d", &N, &M, &Q);
  for (int i = 1; i <= M; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    G[x].push_back(y);
    G[y].push_back(x);
  }
}
void sortEdges() {
  for (int i = 1; i <= N; i++) sort(G[i].begin(), G[i].end());
}
bool existsEdge(int u, int v) {
  int left = 0, right = G[u].size() - 1, mid, sol;
  while (left <= right) {
    mid = (left + right) / 2;
    if (G[u][mid] > v) right = mid - 1;
    if (G[u][mid] < v) left = mid + 1;
    if (G[u][mid] == v) return true;
  }
  return false;
}
void BFS(int source) {
  Queue.push(source);
  Level[source] = 1;
  while (!Queue.empty()) {
    int node = Queue.front();
    Queue.pop();
    for (int i = 0; i < G[node].size(); i++) {
      int neighb = G[node][i];
      if (Level[neighb] == 0) {
        Queue.push(neighb);
        Father[0][neighb] = node;
        Level[neighb] = Level[node] + 1;
      }
    }
  }
}
void precalcFather() {
  for (int i = 1; (1 << i) <= N; i++) {
    for (int j = 1; j <= N; j++) Father[i][j] = Father[i - 1][Father[i - 1][j]];
  }
}
void precalcLog() {
  for (int i = 2; i <= N; i++) Log[i] = Log[i / 2] + 1;
}
int findAncestor(int node, int dist) {
  while (dist > 0) {
    int k = Log[dist];
    node = Father[k][node];
    dist -= (1 << k);
  }
  return node;
}
int findResult(int x, int y) {
  if (Level[x] > Level[y]) swap(x, y);
  int initX = x, initY = y;
  y = findAncestor(y, Level[y] - Level[x]);
  if (x == y) return Level[initY] - Level[initX];
  for (int k = Log[N]; k >= 0; k--)
    if (Father[k][x] != Father[k][y]) {
      x = Father[k][x];
      y = Father[k][y];
    }
  int lca = Father[0][x];
  int res = Level[initY] - Level[lca] + Level[initX] - Level[lca];
  if (existsEdge(x, y)) res--;
  return res;
}
void Solve() {
  for (int i = 1; i <= Q; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    printf("%d\n", findResult(x, y));
  }
}
int main() {
  Read();
  sortEdges();
  precalcLog();
  BFS(1);
  precalcFather();
  Solve();
  return 0;
}
