#include <bits/stdc++.h>
using namespace std;
long long x, y, Lx, Ly;
int lb, lc, X, z, n, m, tt, i, b1, b2, c1, c2, j, Mt, tl, ct;
int que[200011], fa[200011][19];
int g[200011], nxt[400011], Y[400011], dep[200011];
bool pc, pz;
void star(int i, int j) {
  tt++;
  nxt[tt] = g[i];
  g[i] = tt;
  Y[tt] = j;
}
long long gcd(long long a, long long b) {
  if (a % b == 0)
    return b;
  else
    return gcd(b, a % b);
}
long long exgcd(long long a, long long b, long long &x, long long &y) {
  if (!b) return x = 1, y = 0, a;
  long long g = exgcd(b, a % b, y, x);
  ;
  return y -= a / b * x, g;
}
long long Same(long long A, long long B, long long u, long long v) {
  long long x, y, z(v - u), g, ti;
  g = exgcd(A, B, x, y);
  if (z % g) return 1e18;
  x *= z / g, y *= -z / g, A /= g, B /= g;
  if (x < 0)
    ti = max((-x - 1) / B + 1, (-y - 1) / A + 1), x += ti * B, y += ti * A;
  ti = min(x / B, y / A), x -= ti * B, y += ti * A;
  return A * g * x + u;
}
void bfs(int st) {
  int l, r, x, j, k;
  l = r = 1;
  que[l] = st;
  while (l <= r) {
    x = que[l];
    j = g[x];
    while (j != 0) {
      k = Y[j];
      if (k != fa[x][0]) {
        r++;
        que[r] = k;
        fa[k][0] = x;
        dep[k] = dep[x] + 1;
      }
      j = nxt[j];
    }
    l++;
  }
}
int getlca(int x, int z) {
  int i, l, e;
  if (dep[x] < dep[z]) swap(x, z);
  l = dep[x] - dep[z];
  e = 0;
  while (l) {
    if (l % 2 == 1) x = fa[x][e];
    l /= 2;
    e++;
  }
  if (x == z) return x;
  for (i = 18; i >= 0; i--)
    if (fa[x][i] != fa[z][i]) {
      x = fa[x][i];
      z = fa[z][i];
    }
  return fa[x][0];
}
int dmax(int a, int b) {
  if (dep[a] > dep[b])
    return a;
  else
    return b;
}
int dis(int x, int z) { return dep[x] + dep[z] - 2 * dep[getlca(x, z)]; }
long long G(long long M, long long D, long long L, long long R) {
  long long t;
  if ((L - 1) / D < R / D) return (L - 1 + D) / D;
  if (D + D > M) return G(M, M - D, M - R, M - L);
  t = G(D, D - M % D, L % D, R % D);
  return (M * t + L - 1 + D) / D;
}
long long diff(long long A, long long B, long long u, long long v,
               long long L) {
  long long l, r, t, s;
  t = 0;
  l = ((v - u - L) % B + B) % B;
  r = ((v - u + L) % B + B) % B;
  if (l & 1) return 1e18;
  if (B != L + L && l <= r && l) {
    if ((l - 1) / gcd(A, B) >= r / gcd(A, B)) return 1e18;
    t = G(B, A % B, l, r);
  }
  s = (t * A + u + L - v) / B;
  return (L + A * t + B * s + u + v) / 2;
}
long long Work(int a, int b, int c, int d) {
  int u, v, t1, t2, t3, t4, c1, c2, La, Lb, D;
  long long ans;
  u = getlca(a, b);
  v = getlca(c, d);
  if (dep[u] > dep[v]) swap(u, v), swap(a, c), swap(b, d);
  if (getlca(u, v) != u) return -1;
  c1 = dmax(getlca(a, c), getlca(a, d));
  c2 = dmax(getlca(b, c), getlca(b, d));
  if (max(dep[c1], dep[c2]) < dep[v]) return -1;
  c1 = dmax(c1, v);
  c2 = dmax(c2, v);
  La = 2 * dis(a, b);
  Lb = 2 * dis(c, d);
  t1 = dis(a, c1);
  t2 = dis(a, c2);
  t3 = dis(c, c1);
  t4 = dis(c, c2);
  D = dis(c1, c2);
  if (t1 > t2)
    t1 = La - t1;
  else
    t2 = La - t2;
  if (t3 > t4)
    t3 = Lb - t3;
  else
    t4 = Lb - t4;
  ans = 1e18;
  ans = min(Same(La, Lb, t1, t3), Same(La, Lb, t2, t4));
  ans = min(ans, min(diff(La, Lb, t1, t4, D), diff(La, Lb, t2, t3, D)));
  if (ans == 1e18) ans = -1;
  return ans;
}
int main() {
  pc = true;
  scanf("%d", &n);
  for (i = 1; i < n; i++) {
    scanf("%d%d", &X, &z);
    star(X, z);
    star(z, X);
  }
  bfs(1);
  for (i = 1; i <= 18; i++)
    for (j = 1; j <= n; j++) fa[j][i] = fa[fa[j][i - 1]][i - 1];
  scanf("%d", &m);
  for (i = 1; i <= m; i++) {
    scanf("%d%d%d%d", &b1, &b2, &c1, &c2);
    printf("%lld\n", Work(b1, b2, c1, c2));
  }
}
