#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const int maxn = 200005;
const long long inf = 1LL << 60;
inline int read() {
  int res, ok = 1;
  char ch;
  for (ch = getchar(); ch < '0' || ch > '9'; ch = getchar())
    if (ch == '-') ok = -1;
  res = ch - '0';
  for (ch = getchar(); ch >= '0' && ch <= '9'; ch = getchar())
    res = res * 10 + ch - '0';
  return res * ok;
}
int n, T, dis[maxn], fa[maxn][25], last[maxn], tot;
struct edge {
  int u, v, last;
} a[maxn << 1];
inline void link(int u, int v) {
  tot++;
  a[tot].u = u;
  a[tot].v = v;
  a[tot].last = last[u];
  last[u] = tot;
}
inline long long gcd(long long x, long long y) { return y ? gcd(y, x % y) : x; }
inline long long exgcd(long long a, long long b, long long &x, long long &y) {
  if (b == 0) {
    x = 1;
    y = 0;
    return a;
  }
  long long res = exgcd(b, a % b, y, x);
  y = y - a / b * x;
  return res;
}
inline long long work(long long t1, long long s, long long t2, long long t) {
  long long x, y, z, tmp, k;
  z = t2 - t1;
  k = exgcd(s, t, x, y);
  if (z % k) return inf;
  x *= z / k;
  y *= -z / k;
  s /= k;
  t /= k;
  if (x < 0) {
    tmp = max((-x - 1) / t + 1, (-y - 1) / s + 1);
    x += tmp * t;
    y += tmp * s;
  }
  tmp = min(x / t, y / s);
  x -= tmp * t;
  y -= tmp * s;
  return s * x * k + t1;
}
inline long long solve(long long m, long long d, long long l, long long r) {
  if (d + d > m) return solve(m, m - d, m - r, m - l);
  if ((l - 1) / d < r / d) return (l + d - 1) / d;
  long long t = solve(d, (d - m % d) % d, l % d, r % d);
  return t == inf ? inf : (l + m * t + d - 1) / d;
}
inline long long count(long long t1, long long s, long long t2, long long t,
                       long long d) {
  long long z1, z2, tmp = 0, sum;
  z1 = ((t2 - t1 - d) % t + t) % t;
  z2 = ((t2 - t1 + d) % t + t) % t;
  if (z1 & 1) return inf;
  if (t != d * 2 && z1 <= z2 && z1)
    if ((z1 - 1) / gcd(s, t) >= z2 / gcd(s, t))
      return inf;
    else
      tmp = solve(t, s % t, z1, z2);
  sum = (tmp * s + t1 + d - t2) / t;
  return (d + s * tmp + t * sum + t1 + t2) / 2;
}
inline void dfs(int x, int f) {
  for (int i = 0; fa[fa[x][i]][i]; i++) fa[x][i + 1] = fa[fa[x][i]][i];
  for (int i = last[x]; i; i = a[i].last) {
    int v = a[i].v;
    if (v != f) {
      fa[v][0] = x;
      dis[v] = dis[x] + 1;
      dfs(v, x);
    }
  }
}
inline int jump(int x, int h) {
  for (int i = 18; i >= 0; i--) {
    if (h >= (1 << i)) {
      h -= (1 << i);
      x = fa[x][i];
    }
    if (h == 0) return x;
  }
}
inline int lca(int x, int y) {
  if (dis[x] < dis[y]) swap(x, y);
  x = jump(x, dis[x] - dis[y]);
  if (x == y) return x;
  for (int i = 18; i >= 0; i--)
    if (fa[x][i] != fa[y][i]) {
      x = fa[x][i];
      y = fa[y][i];
    }
  return fa[x][0];
}
inline long long len(int x, int y) {
  return dis[x] + dis[y] - dis[lca(x, y)] * 2;
}
inline int cmax(int x, int y) { return dis[x] > dis[y] ? x : y; }
inline long long get_ans(int x1, int y1, int x2, int y2) {
  int u, v, c1, c2;
  u = lca(x1, y1);
  v = lca(x2, y2);
  if (dis[u] > dis[v]) {
    swap(x1, x2);
    swap(y1, y2);
    swap(u, v);
  }
  if (lca(u, v) != u) return -1;
  c1 = cmax(lca(x1, x2), lca(x1, y2));
  c2 = cmax(lca(y1, x2), lca(y1, y2));
  if (max(dis[c2], dis[c1]) < dis[v]) return -1;
  c1 = cmax(c1, v);
  c2 = cmax(c2, v);
  long long s, t, d, t1, t2, t3, t4;
  s = len(x1, y1) * 2;
  t = len(x2, y2) * 2;
  d = len(c1, c2);
  t1 = len(x1, c1);
  t2 = len(x1, c2);
  t3 = len(x2, c1);
  t4 = len(x2, c2);
  if (t1 > t2)
    t1 = s - t1;
  else
    t2 = s - t2;
  if (t3 > t4)
    t3 = t - t3;
  else
    t4 = t - t4;
  long long ans = inf;
  ans = min(ans, work(t1, s, t3, t));
  ans = min(ans, work(t2, s, t4, t));
  ans = min(ans, count(t1, s, t4, t, d));
  ans = min(ans, count(t2, s, t3, t, d));
  return ans == inf ? -1 : ans;
}
int main() {
  n = read();
  for (int i = 1; i < n; i++) {
    int u, v;
    u = read();
    v = read();
    link(u, v);
    link(v, u);
  }
  dfs(1, 0);
  T = read();
  while (T--) {
    int x1, x2, y1, y2;
    x1 = read();
    y1 = read();
    x2 = read();
    y2 = read();
    printf("%I64d\n", get_ans(x1, y1, x2, y2));
  }
  return 0;
}
