#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
template <class c>
struct rge {
  c h, n;
};
template <class c>
rge<c> range(c h, c n) {
  return rge<c>{h, n};
}
template <class c, class F>
struct rgm {
  c h, n;
  F f;
};
template <class c, class F>
rgm<c, F> map_range(c b, c e, F f) {
  return rgm<c, F>{b, e, f};
}
template <class c, class F>
rgm<typename c::const_iterator, F> map_range(const c &x, F f) {
  return map_range(x.begin(), x.end(), f);
}
template <class c>
auto dud(c *r) -> decltype(cerr << *r);
template <class c>
char dud(...);
struct muu {
  template <class c>
  muu &operator<<(const c &) {
    return *this;
  }
};
const int MN = 1e5 + 44;
const int LOG = 17;
int jump[MN][LOG];
vector<int> graf[MN];
int dep[MN];
int go(int x, int len) {
  for (int i = 0; i < LOG; ++i)
    if (len >> i & 1) x = jump[x][i];
  return x;
}
set<pair<int, int> > edges;
int main() {
  int n, m, q;
  scanf("%d%d%d", &n, &m, &q);
  for (int i = 0; i < m; ++i) {
    int a, b;
    scanf("%d%d", &a, &b);
    graf[a].push_back(b);
    graf[b].push_back(a);
    edges.insert(make_pair(min(a, b), max(a, b)));
  }
  for (int i = 1; i <= n; ++i) dep[i] = 1e9;
  dep[1] = 0;
  queue<int> kol;
  kol.push(1);
  while (!kol.empty()) {
    int x = kol.front();
    kol.pop();
    for (int y : graf[x])
      if (dep[y] > dep[x] + 1) {
        dep[y] = dep[x] + 1;
        jump[y][0] = x;
        kol.push(y);
      }
  }
  jump[1][0] = 1;
  for (int i = 1; i < LOG; ++i)
    for (int v = 1; v <= n; ++v) jump[v][i] = jump[jump[v][i - 1]][i - 1];
  for (int i = 0; i < q; ++i) {
    int a, b;
    scanf("%d%d", &a, &b);
    int l = dep[a] + dep[b];
    if (dep[a] > dep[b]) a = go(a, dep[a] - dep[b]);
    if (dep[a] < dep[b]) b = go(b, dep[b] - dep[a]);
    assert(dep[a] == dep[b]);
    if (a == b)
      l -= 2 * dep[a];
    else {
      for (int i = LOG - 1; i >= 0; --i) {
        int aa = jump[a][i];
        int bb = jump[b][i];
        if (aa != bb) {
          a = aa;
          b = bb;
        }
      }
      l -= 2 * dep[a];
      if (edges.count(make_pair(min(a, b), max(a, b))))
        l++;
      else
        l += 2;
    }
    printf("%d\n", l);
  }
}
