#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const int C = 26;
void add(int &x, int y) {
  x += y;
  while (x >= MOD) x -= MOD;
  while (x < 0) x += MOD;
}
int fix(int x) {
  while (x >= MOD) x -= MOD;
  while (x < 0) x += MOD;
  return x;
}
int pw(int a, int b) {
  int ret = 1;
  while (b) {
    if (b & 1) ret = 1ll * ret * a % MOD;
    b >>= 1;
    a = 1ll * a * a % MOD;
  }
  return ret;
}
const int MAXN = 1e5 + 10;
const int LOG = 18;
int par[MAXN][LOG], dep[MAXN];
int qu[MAXN];
int n, m, q;
set<int> adj[MAXN];
void qry(int u, int v) {
  if (dep[u] < dep[v]) swap(u, v);
  int uu = u, vv = v;
  int k = dep[u] - dep[v];
  for (int i = 0; i < LOG; i++)
    if (k >> i & 1) uu = par[uu][i];
  if (uu == vv) {
    cout << dep[u] - dep[v] << "\n";
    return;
  }
  for (int i = LOG - 1; ~i; --i) {
    if (par[uu][i] != par[vv][i]) {
      uu = par[uu][i];
      vv = par[vv][i];
    }
  }
  int shortcut = adj[uu].count(vv);
  int lca = par[uu][0];
  cout << dep[u] + dep[v] - 2 * dep[lca] - shortcut << "\n";
}
void solve() {
  cin >> n >> m >> q;
  for (int i = 0; i < m; i++) {
    int a, b;
    cin >> a >> b;
    --a;
    --b;
    adj[a].insert(b);
    adj[b].insert(a);
  }
  int h = 0, t = 1;
  memset(par, -1, sizeof(par));
  par[0][0] = 0;
  while (t - h) {
    int v = qu[h++];
    for (int i = 1; i < LOG; i++) par[v][i] = par[par[v][i - 1]][i - 1];
    for (int u : adj[v]) {
      if (par[u][0] == -1) {
        par[u][0] = v;
        dep[u] = dep[v] + 1;
        qu[t++] = u;
      }
    }
  }
  while (q--) {
    int a, b;
    cin >> a >> b;
    --a;
    --b;
    qry(a, b);
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int te = 1;
  for (int w = 1; w <= te; w++) {
    solve();
  }
  return 0;
}
