#include <bits/stdc++.h>
using namespace std;
const int N = 4e5 + 7, K = 25;
int n, m, q;
vector<int> g[N];
void read() {
  cin >> n >> m >> q;
  for (int i = 0; i < m; ++i) {
    int a, b;
    cin >> a >> b;
    --a;
    --b;
    g[a].push_back(b);
    g[b].push_back(a);
  }
}
bool us[N];
int d[N], anc[N];
int par[N];
int point;
void build() {
  point = n;
  for (int i = 0; i < n; ++i) {
    par[i] = i;
  }
}
int find(int v) {
  if (par[v] == v) return v;
  return par[v] = find(par[v]);
}
void merge(int x, int y) {
  x = find(x);
  y = find(y);
  if (x != y) {
    par[y] = x;
  }
}
vector<int> t[N];
void add(int a, int b) {
  t[a].push_back(b);
  t[b].push_back(a);
}
void process(int x, int y) {
  while (true) {
    add(point, y);
    if (x == y) break;
    merge(x, y);
    y = anc[y];
  }
  ++point;
}
void dfs(int v, int x = -1) {
  us[v] = true;
  anc[v] = x;
  int mx = -1, vertex = -1;
  for (int to : g[v]) {
    if (us[to]) {
      if (d[v] - d[to] > mx) {
        mx = d[v] - d[to];
        vertex = to;
      }
    } else {
      d[to] = d[v] + 1;
      dfs(to, v);
    }
  }
  if (vertex != -1 && par[v] == v) {
    process(vertex, v);
  }
}
int p[N][K], h[N];
int tin[N], tout[N], timer;
void dfs_tree(int v, int x = -1) {
  tin[v] = ++timer;
  p[v][0] = x;
  for (int i = 1; i < K; ++i) {
    int x = p[v][i - 1];
    if (x == -1)
      p[v][i] = -1;
    else
      p[v][i] = p[x][i - 1];
  }
  for (int to : t[v]) {
    if (to == x) continue;
    h[to] = h[v] + 1;
    dfs_tree(to, v);
  }
  tout[v] = ++timer;
}
bool is_tree(int x, int y) { return (tin[x] <= tin[y] && tout[x] >= tout[y]); }
int find_lca(int x, int y) {
  if (is_tree(x, y)) return x;
  if (is_tree(y, x)) return y;
  for (int i = K - 1; i >= 0; --i) {
    int v = p[y][i];
    if (v == -1 || is_tree(v, x)) continue;
    y = v;
  }
  return p[y][0];
}
void solve() {
  build();
  dfs(0);
  dfs_tree(0);
  while (q--) {
    int x, y;
    cin >> x >> y;
    --x;
    --y;
    int lca = find_lca(x, y);
    int ans = h[x] + h[y] - 2 * h[lca];
    cout << ans / 2 << endl;
  }
}
signed main() {
  std::ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  int q = 1;
  while (q--) {
    read();
    solve();
  }
}
