#include <bits/stdc++.h>
using namespace std;
const int MAX = 1e5 + 5;
constexpr int LOGMAX = 31 - __builtin_clz(MAX) + 3;
vector<int> adj[MAX], tree[MAX];
bool visited[MAX];
int p[LOGMAX][MAX], level[MAX];
int n, m, q;
void dfs(int node) {
  visited[node] = true;
  for (auto &each : tree[node]) {
    if (!visited[each]) {
      level[each] = level[node] + 1;
      p[0][each] = node;
      dfs(each);
    }
  }
}
void bfs(int node) {
  queue<int> Q;
  Q.push(node);
  visited[node] = true;
  while (!Q.empty()) {
    int cur = Q.front();
    Q.pop();
    for (auto &each : adj[cur]) {
      if (!visited[each]) {
        tree[cur].push_back(each);
        tree[each].push_back(cur);
        visited[each] = true;
        Q.push(each);
      }
    }
  }
}
pair<int, int> lca(int u, int v) {
  if (level[u] > level[v]) {
    swap(u, v);
  }
  int lg = 31 - __builtin_clz(level[v]);
  for (int i = int(lg); i >= int(0); i--) {
    if (level[v] - (1 << i) >= level[u]) {
      v = p[i][v];
    }
  }
  if (u == v) {
    return pair<int, int>(u, u);
  }
  lg = 31 - __builtin_clz(level[v]);
  for (int i = int(lg); i >= int(0); i--) {
    if (p[i][v] != p[i][u]) {
      u = p[i][u];
      v = p[i][v];
    }
  }
  return pair<int, int>(u, v);
}
int main() {
  scanf("%d %d %d", &n, &m, &q);
  for (int i = int(0); i < int(m); i++) {
    int u, v;
    scanf("%d %d", &u, &v);
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  for (int i = int(1); i < int(n + 1); i++) {
    sort(adj[i].begin(), adj[i].end());
  }
  bfs(1);
  memset(p, -1, sizeof p);
  memset(visited, false, sizeof visited);
  dfs(1);
  for (int i = int(1); i < int(LOGMAX); i++) {
    for (int j = int(1); j < int(n + 1); j++) {
      if (p[i - 1][j] != -1) {
        p[i][j] = p[i - 1][p[i - 1][j]];
      }
    }
  }
  while (q--) {
    int u, v;
    scanf("%d %d", &u, &v);
    pair<int, int> guys = lca(u, v);
    int ans = 0;
    if (guys.first == guys.second) {
      ans = abs(level[u] - level[v]);
    } else {
      int l = p[0][guys.first];
      ans = level[u] + level[v] - 2 * level[l];
      auto it = lower_bound(adj[guys.first].begin(), adj[guys.first].end(),
                            guys.second);
      if (it != adj[guys.first].end() && *it == guys.second) {
        ans--;
      }
    }
    printf("%d\n", ans);
  }
  return 0;
}
