#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 5, LOGN = 19;
long long n, m, k, l, r, x, y, z, res = 0, tmp = 0, u, v, timer = 0, lvl = -1;
string s, t;
long long in[MAXN], out[MAXN], dubina[MAXN], anc[MAXN][LOGN];
vector<int> adj[MAXN], bfs_stablo[MAXN];
bool visited[MAXN];
queue<int> q;
void dfs(int node, int prev) {
  in[node] = ++timer;
  anc[node][0] = prev;
  for (auto v : bfs_stablo[node]) {
    if (v != prev) {
      dfs(v, node);
    }
  }
  out[node] = ++timer;
}
void bfs() {
  q.push(1);
  dubina[1] = 0;
  anc[1][0] = 1;
  visited[1] = true;
  while (!q.empty()) {
    int node = q.front();
    q.pop();
    for (auto v : adj[node]) {
      if (visited[v]) continue;
      visited[v] = true;
      q.push(v);
      dubina[v] = dubina[node] + 1;
      bfs_stablo[node].push_back(v);
      bfs_stablo[v].push_back(node);
    }
  }
}
bool in_subtree(int u, int v) { return (in[v] <= in[u] && out[u] <= out[v]); }
void preprocess() {
  for (int d = 1; d < LOGN; d++)
    for (int i = 1; i < MAXN; i++) anc[i][d] = anc[anc[i][d - 1]][d - 1];
  for (int i = 1; i <= n; i++) {
  }
}
int lca(int u, int v, bool kk) {
  if (in_subtree(u, v)) return v;
  if (in_subtree(v, u)) return u;
  for (int deg = LOGN - 1; deg >= 0; deg--) {
    if (!in_subtree(v, anc[u][deg])) u = anc[u][deg];
  }
  if (kk) return anc[u][0];
  return u;
}
int distance(int u, int v) {
  return dubina[u] + dubina[v] - 2 * dubina[lca(u, v, true)];
}
void solve() {
  cin >> n >> m >> k;
  for (int i = 0; i < m; i++) {
    cin >> u >> v;
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  bfs();
  dfs(1, 1);
  preprocess();
  for (int i = 1; i <= k; i++) {
    res = 0;
    cin >> u >> v;
    int u_ispod = lca(u, v, false), v_ispod = lca(v, u, false);
    res = distance(u, v);
    if (find(adj[u_ispod].begin(), adj[u_ispod].end(), v_ispod) !=
        adj[u_ispod].end())
      res--;
    cout << res << "\n";
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t;
  t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
