#include <bits/stdc++.h>
const int MAXN = 200010;
using namespace std;
const long long INF = 100000000000000000ll;
int fa[MAXN][20], dep[MAXN];
vector<int> a[MAXN];
int n, q;
void dfs(int x, int f) {
  fa[x][0] = f;
  dep[x] = dep[f] + 1;
  for (int i = 0; i < a[x].size(); i++) {
    int u = a[x][i];
    if (u == f) continue;
    dfs(u, x);
  }
}
int lca(int u, int v) {
  if (dep[u] < dep[v]) swap(u, v);
  for (int i = 19; i >= 0; i--)
    if (dep[fa[u][i]] >= dep[v]) u = fa[u][i];
  if (u == v) return u;
  for (int i = 19; i >= 0; i--)
    if (fa[u][i] != fa[v][i]) {
      u = fa[u][i];
      v = fa[v][i];
    }
  return fa[u][0];
}
int lower(int x, int y) {
  if (dep[x] < dep[y]) return y;
  return x;
}
int dist(int x, int y) {
  int l = lca(x, y);
  return dep[x] + dep[y] - 2 * dep[l];
}
int gcd(int x, int y) {
  if (y == 0) return x;
  return gcd(y, x % y);
}
long long exgcd(long long x, long long y, long long g) {
  if (g == 0) return 0;
  long long t = exgcd(y % x, x, g % x);
  t = (g - t * y) / x;
  if (t < 0) {
    t += (-t) / y * y;
    t += y;
  }
  return t % y;
}
long long Samedir(long long t1, long long d1, long long t2, long long d2,
                  long long l) {
  long long g = (gcd(t1, t2)), m = d2 - d1;
  long long tt = t1;
  if (m < 0) m += t2;
  if (m % g) return INF;
  t1 /= g, m /= g, t2 /= g;
  return exgcd(t1, t2, m) * tt + d1;
}
long long G(long long x, long long y, long long l, long long r) {
  x %= y;
  if (x * 2 > y) return G(y - x, y, y - r, y - l);
  long long t = l / x, rest = y % x;
  long long a, b;
  if (l == t * x) return t;
  if ((t + 1ll) * x <= r) return t + 1ll;
  a = G(x - rest, x, l % x, r % x);
  a = (a * y - 1ll) / x + 1ll;
  b = a * x % y;
  a += (r - b) / x;
  return a;
}
long long D(long long x, long long y, long long l, long long r) {
  long long res = INF, g = gcd(x, y);
  if (l == 0) {
    res = y / g;
    l = 1;
  }
  if ((l - 1) / g >= r / g) return INF;
  return min(res, G(x, y, l, r));
}
long long Diffdir(long long t1, long long d1, long long t2, long long d2,
                  long long l) {
  long long bg = d2 - d1 - l, ed = d2 - d1 + l;
  long long p;
  if (bg < 0) bg += (-bg) / t2 * t2;
  if (ed < 0) ed += (-ed) / t2 * t2;
  bg = (bg + t2) % t2;
  ed = (ed + t2) % t2;
  if (ed % 2ll) return INF;
  if (t2 == l * 2) return d1 + ed / 2ll;
  if (bg > ed || bg == 0) return d1 + ed / 2ll;
  p = D(t1, t2, bg, ed);
  if (p == INF) return INF;
  return t1 * p + d1 + l - (p * t1 % t2 - bg) / 2ll;
}
long long Query(int u, int v, int x, int y) {
  int p1 = lca(u, v), p2 = lca(x, y);
  int p3 = lca(u, x), p4 = lca(v, x);
  int p5 = lca(u, y), p6 = lca(v, y);
  int p, a, b;
  p = lower(p1, p2);
  a = lower(p3, p5);
  b = lower(p4, p6);
  if (dep[a] < dep[p] && dep[b] < dep[p]) return -1;
  if (dep[a] < dep[p]) a = p;
  if (dep[b] < dep[p]) b = p;
  int d1 = dist(u, v) * 2, d4 = dist(x, y) * 2;
  int d2 = dist(u, a), d3 = dist(u, b);
  int d5 = dist(x, a), d6 = dist(x, b);
  int d = dist(a, b);
  if (d2 <= d3)
    d3 = d1 - d3;
  else
    d2 = d1 - d2;
  if (d5 <= d6)
    d6 = d4 - d6;
  else
    d5 = d4 - d5;
  return min(min(Samedir(d1, d2, d4, d5, d), Samedir(d1, d3, d4, d6, d)),
             min(Diffdir(d1, d2, d4, d6, d), Diffdir(d1, d3, d4, d5, d)));
}
int main() {
  scanf("%d", &n);
  for (int i = 1, u, v; i < n; i++) {
    scanf("%d%d", &u, &v);
    a[u].push_back(v);
    a[v].push_back(u);
  }
  dfs(1, 0);
  for (int j = 1; j < 20; j++)
    for (int i = 1; i <= n; i++) fa[i][j] = fa[fa[i][j - 1]][j - 1];
  scanf("%d", &q);
  int x, y;
  for (int i = 1, u, v; i <= q; i++) {
    scanf("%d%d%d%d", &u, &v, &x, &y);
    long long res = Query(u, v, x, y);
    if (res == INF)
      puts("-1");
    else
      printf("%lld\n", Query(u, v, x, y));
  }
  return 0;
}
