#include <bits/stdc++.h>
using namespace std;
const int N = 500010;
vector<int> comp[N];
vector<int> adj[N], g[N];
int h[N], low[N], mark[N];
int ct;
stack<int> st;
int n, m, q;
int dfs_bcc(int u, int p = -1) {
  if (mark[u]++) {
    return h[u];
  }
  h[u] = p == -1 ? 0 : h[p] + 1;
  low[u] = h[u];
  st.push(u);
  for (int v : adj[u]) {
    low[u] = min(low[u], dfs_bcc(v, u));
  }
  if (h[u] - 1 == low[u]) {
    int v;
    do {
      v = st.top();
      st.pop();
      comp[v].push_back(u + n);
    } while (v != u);
    comp[p].push_back(u + n);
  }
  return low[u];
}
const int LN = 19;
int parent[LN][N], depth[N];
int root[N], pre[N];
int art(int u) { return (u < n) * (g[u].size() > 1); }
int id(int u) {
  if (g[u].size() == 1) return g[u].front();
  return u;
}
void dfs(int u, int r, int d = 0, int p = -1) {
  parent[0][u] = p;
  depth[u] = d;
  root[u] = r;
  pre[u] = p == -1 ? 0 : pre[p];
  pre[u] += art(u);
  for (int v : g[u])
    if (v != p) {
      dfs(v, r, d + 1, u);
    }
}
int lca(int u, int v) {
  if (depth[u] < depth[v]) swap(u, v);
  int diff = depth[u] - depth[v];
  for (int i = 0; i < LN; i++) {
    if ((diff >> i) & 1) {
      u = parent[i][u];
    }
  }
  if (u == v) return u;
  for (int i = LN - 1; i >= 0; i--) {
    if (parent[i][u] != parent[i][v]) {
      u = parent[i][u];
      v = parent[i][v];
    }
  }
  return parent[0][u];
}
int main() {
  scanf("%d %d %d", &n, &m, &q);
  for (int i = 0; i < m; i++) {
    int u, v;
    scanf("%d %d", &u, &v);
    u--, v--;
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  for (int u = 0; u < n; u++) {
    if (!mark[u]) {
      dfs_bcc(u);
    }
  }
  for (int u = 0; u < n; u++) {
    for (int v : comp[u]) {
      g[u].push_back(v);
      g[v].push_back(u);
    }
  }
  memset(root, -1, sizeof root);
  memset(parent, -1, sizeof parent);
  for (int i = 0; i < n; i++) {
    if (root[i] == -1) {
      dfs(i, i);
    }
  }
  for (int i = 1; i < LN; i++) {
    for (int j = 0; j < 2 * n; j++) {
      if (parent[i - 1][j] != -1) {
        parent[i][j] = parent[i - 1][parent[i - 1][j]];
      }
    }
  }
  while (q--) {
    int u, v;
    scanf("%d %d", &u, &v);
    u--, v--;
    int a = lca(u, v);
    printf("%d\n", (depth[u] + depth[v] - 2 * depth[a]) / 2);
  }
  return 0;
}
