#include <bits/stdc++.h>
#pragma gcc optimize("Ofast")
using namespace std;
template <typename T>
using maxHeap = priority_queue<T, vector<T>, less<T>>;
template <typename T>
using minHeap = priority_queue<T, vector<T>, greater<T>>;
inline void input(int& _x) {
  _x = 0;
  int _tmp = 1;
  char _tc = getchar();
  while ((_tc < '0' || _tc > '9') && _tc != '-') _tc = getchar();
  if (_tc == '-') _tc = getchar(), _tmp = -1;
  while (_tc >= '0' && _tc <= '9') _x = _x * 10 + (_tc - 48), _tc = getchar();
  _x *= _tmp;
}
inline void output(int _x) {
  char _buff[20];
  int _f = 0;
  if (_x == 0) putchar('0');
  while (_x > 0) {
    _buff[_f++] = _x % 10 + '0';
    _x /= 10;
  }
  for (_f -= 1; _f >= 0; _f--) putchar(_buff[_f]);
  putchar('\n');
}
template <typename Iter>
ostream& _out(ostream& s, Iter b, Iter e) {
  s << "[";
  for (auto it = b; it != e; it++) s << (it == b ? "" : " ") << *it;
  s << "]";
  return s;
}
template <class T1, class T2>
ostream& operator<<(ostream& out, pair<T1, T2> p) {
  return out << '(' << p.first << ", " << p.second << ')';
}
template <typename T>
ostream& operator<<(ostream& s, const vector<T>& c) {
  return _out(s, c.begin(), c.end());
}
class DSU {
 private:
  vector<int> arr;
  vector<int> sizes;
  int N;

 public:
  DSU() { N = -1; }
  void build(int nn) {
    N = nn;
    arr.resize(N);
    sizes.resize(N);
    fill(sizes.begin(), sizes.end(), 1);
    for (int i = 0; i < N; i++) arr[i] = i;
  }
  int find(int i) {
    if (i == arr[i]) return i;
    return arr[i] = find(arr[i]);
  }
  bool isSame(int i, int j) { return find(i) == find(j); }
  bool join(int i, int j) {
    i = find(i);
    j = find(j);
    if (i == j) return false;
    if (sizes[i] > sizes[j]) swap(i, j);
    arr[i] = j;
    sizes[j] += sizes[i];
    return true;
  }
  int size() { return N; }
};
struct point {
  int parent;
  int id;
  int no;
  vector<int> children;
};
vector<DSU> DSUs;
vector<vector<int>> G;
vector<point> BFST;
vector<pair<int64_t, int64_t>> T;
vector<int> depth;
vector<vector<int>> doubanc;
int root = 0, t = 0;
void DFS(int x, int px, int n) {
  T[x].first = t++;
  depth[x] = depth[px] + 1;
  doubanc[x].push_back(px);
  for (int i = 1; 1 << i <= 2 * n; i++)
    doubanc[x].push_back(doubanc[doubanc[x][i - 1]][i - 1]);
  for (int y : BFST[x].children) DFS(y, x, n);
  T[x].second = t++;
}
bool isAncestor(int x, int y) {
  return T[x].first <= T[y].first && T[x].second >= T[y].second;
}
int logg2(int _x) {
  int i = 0;
  while (1 << i <= _x) i++;
  return i - 1;
}
int LCA(int x, int y, int n) {
  if (isAncestor(x, y)) return x;
  if (isAncestor(y, x)) return y;
  for (int i = logg2(n / 2); i >= 0; i--)
    if (!isAncestor(doubanc[x][i], y)) x = doubanc[x][i];
  return doubanc[x][0];
}
int ancestor(int x, int k) {
  if (k == 0) return x;
  if (doubanc[x][logg2(k)] == root)
    return root;
  else
    return ancestor(doubanc[x][logg2(k)], k - (1 << logg2(k)));
}
int query(int x, int y, int n) {
  if (isAncestor(x, y)) return depth[y] - depth[x];
  if (isAncestor(y, x)) return depth[x] - depth[y];
  int lca = LCA(x, y, n);
  int ans = depth[x] + depth[y] - depth[lca] * 2;
  if (DSUs[lca].isSame(BFST[ancestor(x, depth[x] - depth[lca] - 1)].no,
                       BFST[ancestor(y, depth[y] - depth[lca] - 1)].no)) {
    ans--;
  }
  return ans;
}
queue<pair<int, int>> bfs;
vector<bool> gone;
signed main() {
  int n, m, q, a, b;
  input(n);
  input(m);
  input(q);
  BFST.resize(n);
  G.resize(n);
  T.resize(n);
  depth.resize(n);
  doubanc.resize(n);
  gone.resize(n);
  DSUs.resize(n);
  for (int i = 0; i < m; i++) {
    input(a);
    input(b);
    a--;
    b--;
    G[a].push_back(b);
    G[b].push_back(a);
  }
  bfs.push({0, -1});
  while (!bfs.empty()) {
    auto now = bfs.front();
    bfs.pop();
    if (!gone[now.first]) {
      BFST[now.first].parent = now.second;
      gone[now.first] = true;
      if (now.second != -1) {
        BFST[now.first].no = (int)BFST[now.second].children.size();
        BFST[now.second].children.push_back(now.first);
      } else {
        BFST[now.first].no = 0;
      }
      for (int i : G[now.first]) {
        if (i != now.second) {
          bfs.push({i, now.first});
        }
      }
    } else {
      int nowpar = BFST[now.second].parent;
      if (DSUs[nowpar].size() == -1)
        DSUs[nowpar].build((int)BFST[nowpar].children.size());
      DSUs[nowpar].join(BFST[now.second].no, BFST[now.first].no);
    }
  }
  for (int i = 0; i < n; i++)
    if (DSUs[i].size() == -1) DSUs[i].build((int)BFST[i].children.size());
  DFS(0, 0, n);
  while (q--) {
    input(a);
    input(b);
    --a;
    --b;
    output(query(a, b, n));
  }
}
