#include <bits/stdc++.h>
using namespace std;
uint64_t rnd_data = 0xDEADBEEFDULL;
inline void my_srand(int seed) { rnd_data = ((uint64_t)seed << 16) | 0x330E; }
inline int my_rand() {
  rnd_data = rnd_data * 0x5DEECE66DULL + 0xB;
  return (rnd_data >> 17) & 0x7FFFFFFF;
}
template <typename T>
void my_random_shuffle(T b, T e) {
  for (int i = (1); i <= (int)((int)(e - b) - 1); i++) {
    swap(b[i], b[my_rand() % (i + 1)]);
  }
}
template <class _T>
inline _T sqr(const _T &x) {
  return x * x;
}
template <typename type_t, typename less_t = std::less<type_t>>
inline bool uin(type_t &a, const type_t &b, const less_t &ls = less_t()) {
  return ls(b, a) ? a = b, true : false;
}
template <typename type_t, typename less_t = std::less<type_t>>
inline bool uax(type_t &a, const type_t &b, const less_t &ls = less_t()) {
  return ls(a, b) ? a = b, true : false;
}
const long double PI = 3.1415926535897932384626433832795L;
const long double EPS = 1e-9;
const int LOG = 18;
struct hasher_t {
  size_t operator()(pair<int, int> p) const {
    return (p.first << 20) ^ p.second;
  }
};
int n, m, k, nn;
vector<pair<int, int>> a[102400];
vector<int> g[202400];
int e[502400][2];
int pa[502400];
int num[502400];
vector<int> ec[502400];
bool u[502400];
int up[LOG][202400];
int h[202400];
unordered_set<pair<int, int>, hasher_t> ue;
unordered_map<pair<int, int>, int, hasher_t> ne;
vector<int> cv;
inline int find(int first) {
  return first == pa[first] ? first : pa[first] = find(pa[first]);
}
inline void unite(int first, int second) {
  first = find(first);
  second = find(second);
  if (first == second) return;
  if (my_rand() & 1) swap(first, second);
  pa[first] = second;
}
void dfs0(int ee) {
  u[ee] = true;
  int first = e[ee][0];
  int second = e[ee][1];
  if (first > second) swap(first, second);
  if (ue.count(make_pair(first, second))) return;
  ue.insert(make_pair(first, second));
  if (a[first].size() > a[second].size()) swap(first, second);
  {
    for (auto p : a[first]) {
      int z = p.first;
      auto it =
          lower_bound((a[second]).begin(), (a[second]).end(), make_pair(z, -1));
      if (it != a[second].end() && it->first == z) {
        unite(p.second, it->second);
        unite(p.second, ee);
        for (int v : cv) {
          int xx = v;
          int yy = z;
          if (xx > yy) swap(xx, yy);
          unite(ee, ne[make_pair(xx, yy)]);
          ue.insert(make_pair(xx, yy));
        }
        cv.push_back(z);
      }
    }
  }
}
void dfs(int k, int prev, int hh) {
  h[k] = hh;
  up[0][k] = prev;
  u[k] = true;
  for (int v : g[k]) {
    if (u[v]) continue;
    dfs(v, k, hh + 1);
  }
}
int go(int first, int second) {
  if (h[first] < h[second]) swap(first, second);
  int d = h[first] - h[second];
  for (int i = (LOG)-1; i >= 0; i--) {
    if (d & (1 << i)) {
      first = up[i][first];
    }
  }
  if (first == second) return first;
  for (int i = (LOG)-1; i >= 0; i--) {
    if (up[i][first] != -1 && up[i][second] != -1 &&
        up[i][first] != up[i][second]) {
      first = up[i][first];
      second = up[i][second];
    }
  }
  assert(up[0][first] == up[0][second]);
  return up[0][first];
}
int main() {
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 0; i < (int)(n); i++) {
    a[i].reserve(8);
  }
  for (int i = 0; i < (int)(m); i++) {
    int first, second;
    scanf("%d%d", &first, &second);
    first--;
    second--;
    assert(first >= 0 && first < n);
    assert(second >= 0 && second < n);
    assert(first != second);
    if (first > second) swap(first, second);
    ne[make_pair(first, second)] = i;
    e[i][0] = first;
    e[i][1] = second;
    a[first].push_back(make_pair(second, i));
    a[second].push_back(make_pair(first, i));
    pa[i] = i;
  }
  for (int i = 0; i < (int)(n); i++) {
    sort((a[i]).begin(), (a[i]).end());
  }
  memset((u), 0, sizeof(u));
  for (int i = 0; i < (int)(n); i++) {
    for (auto p : a[i]) {
      int first = e[p.second][0];
      int second = e[p.second][1];
      if (first > second) swap(first, second);
      if (ue.count(make_pair(first, second))) continue;
      {
        cv.clear();
        cv.push_back(first);
        cv.push_back(second);
        dfs0(p.second);
      }
    }
  }
  nn = n;
  for (int i = 0; i < (int)(m); i++) {
    if (pa[i] == i) {
      num[i] = nn++;
    }
  }
  for (int i = 0; i < (int)(m); i++) {
    ec[find(i)].push_back(i);
  }
  for (int i = 0; i < (int)(nn); i++) {
    g[i].reserve(8);
  }
  for (int i = 0; i < (int)(m); i++) {
    if (i == pa[i]) {
      vector<int> w;
      for (auto ee : ec[i]) {
        w.push_back(e[ee][0]);
        w.push_back(e[ee][1]);
      }
      sort((w).begin(), (w).end());
      w.erase(unique((w).begin(), (w).end()), w.end());
      for (int v : w) {
        g[v].push_back(num[i]);
        g[num[i]].push_back(v);
      }
    }
  }
  memset(up, 0xff, sizeof(up));
  memset((u), 0, sizeof(u));
  dfs(0, -1, 0);
  for (int i = 0; i < (int)(LOG - 1); i++) {
    for (int j = 0; j < (int)(nn); j++) {
      if (up[i][j] >= 0) up[i + 1][j] = up[i][up[i][j]];
    }
  }
  for (int i = 0; i < (int)(k); i++) {
    int first, second;
    scanf("%d%d", &first, &second);
    first--;
    second--;
    int z = go(first, second);
    printf("%d\n", (h[first] + h[second] - h[z] * 2) / 2);
  }
  return 0;
}
