#include <bits/stdc++.h>
using namespace std;
int n, m, head[1000100], nxt[1000200], to[1000200];
int dt[1000100], low[1000100], T, vis[1000200], stk[1000200], top, C;
int cnt, rt[1000100], dp[1000100];
int p[1000100][18], c[1000100][18];
vector<int> v[1000100];
vector<int> bcc[1000200];
vector<int> vec[1000200];
vector<int> g[1000100];
void add_edge(int x, int y, int id) {
  to[id] = y;
  nxt[id] = head[x], head[x] = id;
}
void dfs(int x) {
  dt[x] = low[x] = ++T;
  for (int i = head[x]; i; i = nxt[i])
    if (!vis[i] && !vis[i ^ 1]) {
      vis[i] = 1;
      int y = to[i];
      if (dt[y] < dt[x]) stk[++top] = i;
      if (!dt[y]) {
        dfs(y);
        low[x] = min(low[x], low[y]);
        if (low[y] >= dt[x]) {
          bcc[++cnt].clear();
          int id;
          do {
            id = stk[top--];
            bcc[cnt].push_back(id);
          } while (id != i);
        }
      } else
        low[x] = min(low[x], dt[y]);
    }
  return;
}
inline char nc() {
  static char buf[100000], *p1 = buf, *p2 = buf;
  if (p1 == p2) {
    p2 = (p1 = buf) + fread(buf, 1, 100000, stdin);
    if (p1 == p2) return EOF;
  }
  return *p1++;
}
inline int getint() {
  int x;
  char c = nc(), b = 1;
  if (c == -1) return 0;
  for (; !(c >= '0' && c <= '9'); c = nc())
    if (c == '-') b = -1;
  for (x = 0; c >= '0' && c <= '9'; x = x * 10 + c - '0', c = nc())
    ;
  x *= b;
  return x;
}
void dfs_A(int k, int pa = 0) {
  p[k][0] = pa;
  dp[k] = dp[pa] + 1;
  if (k <= cnt)
    c[k][0] = 1;
  else
    c[k][0] = 0;
  for (int i = 1; i <= 17; i++) {
    p[k][i] = p[p[k][i - 1]][i - 1];
    c[k][i] = c[k][i - 1] + c[p[k][i - 1]][i - 1];
  }
  for (auto x : v[k]) {
    if (x == pa) continue;
    dfs_A(x, k);
  }
  return;
}
int res;
void query(int x, int y) {
  if (dp[x] < dp[y]) swap(x, y);
  for (int i = 17; i >= 0; i--)
    if (dp[x] - dp[y] >= (1 << i)) {
      res += c[x][i];
      x = p[x][i];
    }
  if (x == y) {
    res += c[y][0];
    return;
  }
  for (int i = 17; i >= 0; i--)
    if (p[x][i] != p[y][i]) {
      res += c[x][i] + c[y][i];
      x = p[x][i], y = p[y][i];
    }
  res += c[x][0] + c[y][0];
  res += c[p[x][0]][0];
  return;
}
int main() {
  int Q;
  n = getint(), m = getint();
  Q = getint();
  int x, y, z;
  for (int i = 1; i <= m; i++) {
    x = getint(), y = getint();
    add_edge(x, y, i << 1);
    add_edge(y, x, i << 1 ^ 1);
  }
  dfs(1);
  for (int i = 1; i <= cnt; i++) {
    for (auto x : bcc[i]) {
      vec[i].push_back(to[x]);
      vec[i].push_back(to[x ^ 1]);
    }
    sort(vec[i].begin(), vec[i].end());
    int sz = unique(vec[i].begin(), vec[i].end()) - vec[i].begin();
    vec[i].resize(sz);
    for (auto x : vec[i]) g[x].push_back(i);
  }
  for (int i = 1; i <= n; i++) {
    if (g[i].size() == 1)
      rt[i] = g[i][0];
    else {
      rt[i] = cnt + i;
      for (auto x : g[i]) {
        v[x].push_back(i + cnt);
        v[i + cnt].push_back(x);
      }
    }
  }
  dfs_A(1);
  while (Q--) {
    x = getint(), y = getint();
    res = 0;
    if (rt[x] == rt[y])
      res = 1;
    else {
      query(rt[x], rt[y]);
    }
    printf("%d\n", res);
  }
  return 0;
}
