#include <bits/stdc++.h>
using namespace std;
const int max_n = 1e5 + 5;
int n, m, qq, v, u;
set<int> graph[max_n];
bool visited[max_n];
struct LCA {
  vector<vector<int> > adj, st;
  int n;
  vector<int> h;
  int lg;
  LCA(int _n) {
    h.resize(_n);
    n = _n;
    adj.resize(n);
  }
  void AddEdge(int u, int v) {
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  void CalcParent() {
    lg = 0;
    while ((1 << lg) <= n) {
      lg++;
    }
    st.resize(lg);
    for (int i = 0; i < lg; i++) {
      st[i].resize(n);
    }
    DFSParent(0, -1);
    for (int i = 1; i < lg; i++) {
      for (int j = 0; j < n; j++) {
        if (st[i - 1][j] == -1)
          st[i][j] = -1;
        else
          st[i][j] = st[i - 1][st[i - 1][j]];
      }
    }
  }
  void DFSParent(int u, int p) {
    st[0][u] = p;
    if (p == -1)
      h[u] = 0;
    else
      h[u] = h[p] + 1;
    for (int i = 0; i < adj[u].size(); i++) {
      int v = adj[u][i];
      if (v == p) continue;
      DFSParent(v, u);
    }
  }
  int CalLCA(int u, int v) {
    if (h[u] > h[v]) swap(u, v);
    for (int i = lg - 1; i >= 0; i--) {
      if (st[i][v] != -1 && h[st[i][v]] >= h[u]) {
        v = st[i][v];
      }
    }
    if (u == v) return u;
    for (int i = lg - 1; i >= 0; i--) {
      if (st[i][v] != -1 && st[i][v] != st[i][u]) {
        u = st[i][u];
        v = st[i][v];
      }
    }
    return st[0][u];
  }
  int getpar(int u, int k) {
    for (int i = lg - 1; i >= 0; i--) {
      if (k & (1 << i)) {
        u = st[i][u];
      }
    }
    return u;
  }
};
int main() {
  scanf("%d%d%d", &n, &m, &qq);
  for (int i = 0; i < m; i++) {
    scanf("%d%d", &u, &v);
    u--;
    v--;
    graph[u].insert(v);
    graph[v].insert(u);
  }
  LCA T(n);
  queue<int> q;
  q.push(0);
  visited[0] = true;
  while (q.size()) {
    u = q.front();
    q.pop();
    for (int v : graph[u]) {
      if (!visited[v]) {
        visited[v] = true;
        q.push(v);
        T.AddEdge(u, v);
      }
    }
  }
  T.CalcParent();
  for (int i = 0; i < qq; i++) {
    scanf("%d%d", &u, &v);
    u--;
    v--;
    int lc = T.CalLCA(u, v);
    int ans = T.h[u] + T.h[v] - 2 * T.h[lc];
    if (lc == u || lc == v)
      printf("%d\n", ans);
    else {
      u = T.getpar(u, T.h[u] - T.h[lc] - 1);
      v = T.getpar(v, T.h[v] - T.h[lc] - 1);
      if (graph[u].find(v) != graph[u].end()) ans--;
      printf("%d\n", ans);
    }
  }
  return 0;
}
