In an unspecified solar system, there are N planets. A space government company has recently hired space contractors to build M bidirectional Hyperspace™ highways, each connecting two different planets. The primary objective, which was to make sure that every planet can be reached from any other planet taking only Hyperspace™ highways, has been completely fulfilled. Unfortunately, lots of space contractors had friends and cousins in the Space Board of Directors of the company, so the company decided to do much more than just connecting all planets. 

In order to make spending enormous amounts of space money for Hyperspace™ highways look neccessary, they decided to enforce a strict rule on the Hyperspace™ highway network: whenever there is a way to travel through some planets and return to the starting point without travelling through any planet twice, every pair of planets on the itinerary should be directly connected by a Hyperspace™ highway. In other words, the set of planets in every simple cycle induces a complete subgraph.

You are designing a Hyperspace™ navigational app, and the key technical problem you are facing is finding the minimal number of Hyperspace™ highways one needs to use to travel from planet A to planet B. As this problem is too easy for Bubble Cup, here is a harder task: your program needs to do it for Q pairs of planets.

Input

The first line contains three positive integers N (1≤ N≤ 100 000), M (1≤ M≤ 500 000) and Q (1≤ Q≤ 200 000), denoting the number of planets, the number of Hyperspace™ highways, and the number of queries, respectively.

Each of the following M lines contains a highway: highway i is given by two integers u_i and v_i (1 ≤ u_i < v_i ≤ N), meaning the planets u_i and v_i are connected by a Hyperspace™ highway. It is guaranteed that the network of planets and Hyperspace™ highways forms a simple connected graph.

Each of the following Q lines contains a query: query j is given by two integers a_j and b_j (1 ≤ a_j < b_j ≤ N ), meaning we are interested in the minimal number of Hyperspace™ highways one needs to take to travel from planet a_j to planet b_j.

Output

Output Q lines: the j-th line of output should contain the minimal number of Hyperspace™ highways one needs to take to travel from planet a_j to planet b_j.

Examples

Input

5 7 2
1 2
1 3
1 4
2 3
2 4
3 4
1 5
1 4
2 5


Output

1
2


Input

8 11 4
1 2
2 3
3 4
4 5
1 3
1 6
3 5
3 7
4 7
5 7
6 8
1 5
2 4
6 7
3 8


Output

2
2
3
3

Note

The graph from the second sample: <image>
#include <bits/stdc++.h>
using namespace std;
int n, m, qq;
vector<int> g[100005], tr[100005];
int mark[100005], dpt[100005];
map<pair<int, int>, bool> conn;
int timer, tin[100005], tout[100005], up[100005][21], l = 20;
void dfs(int st, int pr, int cd = 0) {
  tin[st] = ++timer;
  dpt[st] = cd;
  up[st][0] = pr;
  for (int i = 1; i <= l; ++i) up[st][i] = up[up[st][i - 1]][i - 1];
  for (int v : tr[st]) {
    if (v == pr) continue;
    dfs(v, st, cd + 1);
  }
  tout[st] = ++timer;
}
bool upper(int a, int b) { return tin[a] <= tin[b] && tout[a] >= tout[b]; }
pair<int, int> lca2(int a, int b) {
  int ax = a;
  for (int i = l; i >= 0; --i)
    if (!upper(up[ax][i], b)) ax = up[ax][i];
  int bx = b;
  for (int i = l; i >= 0; --i)
    if (!upper(up[bx][i], a)) bx = up[bx][i];
  return make_pair(ax, bx);
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> n >> m >> qq;
  for (int i = 1; i <= m; ++i) {
    int u, v;
    cin >> u >> v;
    g[u].push_back(v);
    g[v].push_back(u);
    conn[make_pair(u, v)] = 1;
    conn[make_pair(v, u)] = 1;
  }
  queue<int> q;
  q.push(1);
  mark[1] = 1;
  while (!q.empty()) {
    int st = q.front();
    q.pop();
    for (int v : g[st])
      if (!mark[v]) {
        mark[v] = 1;
        tr[st].push_back(v);
        tr[v].push_back(st);
        q.push(v);
      }
  }
  dfs(1, 1);
  while (qq--) {
    int a, b;
    cin >> a >> b;
    if (upper(b, a)) swap(a, b);
    if (upper(a, b)) {
      cout << dpt[b] - dpt[a] << '\n';
    } else {
      pair<int, int> tem = lca2(a, b);
      int lc = up[tem.first][0];
      int dis = dpt[a] + dpt[b] - 2 * dpt[lc];
      if (conn.find(tem) != conn.end()) dis--;
      cout << dis << '\n';
    }
  }
}
