#include <bits/stdc++.h>
using namespace std;
int n, m, Q, cnt = 0, h[100007] = {0}, dep[100007] = {0}, fa[100007] = {0},
             f[100007][17] = {0};
struct node {
  int to, ne;
} edge[1000007];
queue<int> q;
set<long long> S;
inline void add(int x, int y) {
  cnt++;
  edge[cnt].to = y;
  edge[cnt].ne = h[x];
  h[x] = cnt;
  return;
}
inline int getint() {
  char ch = getchar();
  int res = 0;
  while (ch < '0' || '9' < ch) ch = getchar();
  while ('0' <= ch && ch <= '9') {
    res = res * 10 + ch - '0';
    ch = getchar();
  }
  return res;
}
void bfs() {
  q.push(1);
  dep[1] = 1;
  int v;
  while (!q.empty()) {
    v = q.front();
    q.pop();
    for (int i = h[v], to; i; i = edge[i].ne) {
      to = edge[i].to;
      if (to == fa[v] || fa[to]) continue;
      fa[to] = v;
      dep[to] = dep[v] + 1;
      q.push(to);
    }
  }
  return;
}
void ST() {
  int l = log2(n);
  for (int i = 1; i <= n; i++) f[i][0] = fa[i];
  for (int i = 1; i <= l; i++)
    for (int j = 1; j <= n; j++)
      if (f[j][i - 1] != 0) f[j][i] = f[f[j][i - 1]][i - 1];
  return;
}
inline int ask(int a, int b) {
  if (dep[a] < dep[b]) swap(a, b);
  int p1 = dep[a], p2 = dep[b], l = log2(dep[a]) + 1;
  for (int i = l; i >= 0; i--)
    if (f[a][i] && dep[f[a][i]] >= dep[b]) a = f[a][i];
  if (a == b) return p1 - p2;
  l = log2(dep[a]);
  for (int i = l; i >= 0; i--)
    if (f[a][i] != 0 && f[a][i] != f[b][i]) {
      a = f[a][i];
      b = f[b][i];
    }
  long long np;
  np = min(a, b);
  np = n * np + max(a, b);
  if (S.count(np)) return p1 - dep[a] + p2 - dep[b] + 1;
  return p1 - dep[a] + p2 - dep[b] + 2;
}
int main() {
  n = getint();
  m = getint();
  Q = getint();
  long long a, b;
  for (int i = 1, x, y; i <= m; i++) {
    x = getint();
    y = getint();
    add(x, y);
    add(y, x);
    a = min(x, y);
    b = max(x, y);
    S.insert(a * n + b);
  }
  bfs();
  ST();
  int x, y, i = 0;
  while (Q--) {
    x = getint();
    y = getint();
    printf("%d\n", ask(x, y));
  }
  return 0;
}
