#include <bits/stdc++.h>
using namespace std;
int N, M, Q, anc[100010][20], dub[100010], in[100010], out[100010], timer,
    pos[100010];
queue<int> bfsq;
vector<int> adj[100010], adjj[100010];
void DFS(int node, int prev) {
  in[node] = ++timer;
  for (auto x : adjj[node])
    if (x != prev) DFS(x, node);
  out[node] = ++timer;
}
bool inSubtree(int x, int y) { return (in[y] <= in[x] && out[x] <= out[y]); }
int LCA(int x, int y, bool pravi) {
  if (inSubtree(x, y)) return y;
  if (inSubtree(y, x)) return x;
  for (int i = 20 - 1; i >= 0; i--) {
    if (!inSubtree(y, anc[x][i])) x = anc[x][i];
  }
  if (pravi) return anc[x][0];
  return x;
}
int dist(int x, int y) { return dub[x] + dub[y] - 2 * dub[LCA(x, y, 1)]; }
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> N >> M >> Q;
  for (int i = 1; i <= M; i++) {
    int x, y;
    cin >> x >> y;
    adj[x].push_back(y);
    adj[y].push_back(x);
  }
  for (int i = 1; i <= N; i++) sort(begin(adj[i]), end(adj[i]));
  bfsq.push(1);
  anc[1][0] = 1;
  pos[1] = 1;
  while (!bfsq.empty()) {
    int node = bfsq.front();
    bfsq.pop();
    for (auto x : adj[node]) {
      if (!pos[x]) {
        pos[x] = 1;
        bfsq.push(x);
        anc[x][0] = node;
        dub[x] = dub[node] + 1;
        adjj[node].push_back(x);
      }
    }
  }
  for (int d = 1; d < 20; d++)
    for (int i = 1; i <= N; i++) anc[i][d] = anc[anc[i][d - 1]][d - 1];
  DFS(1, 1);
  for (int i = 1; i <= Q; i++) {
    int x, y;
    cin >> x >> y;
    int xx = LCA(x, y, 0), yy = LCA(y, x, 0);
    if (binary_search(begin(adj[xx]), end(adj[xx]), yy))
      cout << dist(x, y) - 1 << '\n';
    else
      cout << dist(x, y) << '\n';
  }
  return 0;
}
