#include <bits/stdc++.h>
using namespace std;
template <typename TP>
inline void read(TP &tar) {
  TP ret = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    ret = ret * 10 + (ch - '0');
    ch = getchar();
  }
  tar = ret * f;
}
template <typename TP, typename... Args>
inline void read(TP &t, Args &...args) {
  read(t), read(args...);
}
namespace RKK {
const int N = 200011;
const long long linf = 0x3f3f3f3f3f3f3f3f;
struct sumireko {
  int to, ne;
} e[N << 1];
int he[N], ecnt;
void addline(int f, int t) {
  e[++ecnt].to = t;
  e[ecnt].ne = he[f], he[f] = ecnt;
}
int n, qaq, log[N << 1];
int fa[N], dep[N];
int es[N], ea, ex[N << 1][20];
int spmin(const int &a, const int &b) { return dep[a] < dep[b] ? a : b; }
int spmax(const int &a, const int &b) { return dep[a] > dep[b] ? a : b; }
void dfs(int x) {
  ex[es[x] = ++ea][0] = x;
  for (int i = he[x], t = e[i].to; i; i = e[i].ne, t = e[i].to)
    if (t != fa[x]) fa[t] = x, dep[t] = dep[x] + 1, dfs(t), ex[++ea][0] = x;
}
int lca(int x, int y) {
  x = es[x], y = es[y];
  if (x > y) swap(x, y);
  int k = log[y - x + 1];
  return spmin(ex[x][k], ex[y - (1 << k) + 1][k]);
}
int dis(int x, int y) { return dep[x] + dep[y] - 2 * dep[lca(x, y)]; }
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
void exgcd(long long a, long long b, long long &x, long long &y) {
  if (!b) return (void)(x = 1, y = 0);
  exgcd(b, a % b, x, y);
  long long t = x;
  x = y;
  y = t - a / b * x;
}
long long calc1(long long a1, long long a2, long long b1, long long b2) {
  long long x = 1, y = 0, d = b2 - b1, g = gcd(a1, a2), t;
  if (d % g) return linf;
  exgcd(a1, a2, x, y);
  x *= d / g, y *= -d / g, a1 /= g, a2 /= g;
  if (x < 0)
    t = max(-(x + 1) / a2 + 1, -(y + 1) / a1 + 1), x += a2 * t, y += a1 * t;
  t = min(x / a2, y / a1), x -= a2 * t, y += a1 * t;
  return a1 * g * x + b1;
}
long long get(long long a, long long mo, long long l, long long r) {
  if ((l - 1) / a != r / a) return (l - 1 + a) / a;
  if (a * 2 > mo) return get(mo - a, mo, mo - r, mo - l);
  return (mo * get(a - mo % a, a, l % a, r % a) + (l - 1 + a)) / a;
}
long long calc2(long long a1, long long a2, long long b1, long long b2,
                long long d) {
  long long l = ((b2 - b1 - d) % a2 + a2) % a2;
  long long r = ((b2 - b1 + d) % a2 + a2) % a2;
  if (l & 1ll) return linf;
  long long t = 0;
  if (a2 != d + d && l <= r && l) {
    if ((l - 1) / gcd(a1, a2) >= r / gcd(a1, a2)) return linf;
    t = get(a1 % a2, a2, l, r);
  }
  long long s = (t * a1 + b1 - b2 + d) / a2;
  return (a1 * t + a2 * s + b1 + b2 + d) / 2;
}
long long solve(int x1, int y1, int x2, int y2) {
  int z1 = lca(x1, y1), z2 = lca(x2, y2);
  if (dep[z1] > dep[z2]) swap(x1, x2), swap(y1, y2), swap(z1, z2);
  if (lca(z1, z2) != z1 && lca(z1, z2) != z2) return -1ll;
  int w1 = spmax(lca(x1, x2), lca(x1, y2)),
      w2 = spmax(lca(y1, x2), lca(y1, y2));
  if (max(dep[w1], dep[w2]) < dep[z2]) return -1ll;
  w1 = spmax(w1, z2), w2 = spmax(w2, z2);
  int l1 = 2 * dis(x1, y1), l2 = 2 * dis(x2, y2);
  int t1 = dis(x1, w1), t2 = dis(x1, w2);
  t1 > t2 ? t1 = l1 - t1 : t2 = l1 - t2;
  int t3 = dis(x2, w1), t4 = dis(x2, w2);
  t3 > t4 ? t3 = l2 - t3 : t4 = l2 - t4;
  int d = dis(w1, w2);
  long long ans = min(min(calc1(l1, l2, t1, t3), calc1(l1, l2, t2, t4)),
                      min(calc2(l1, l2, t1, t4, d), calc2(l1, l2, t2, t3, d)));
  return ans == linf ? -1ll : ans;
}
int main() {
  read(n);
  for (int i = 2, x, y; i <= n; i++) read(x, y), addline(x, y), addline(y, x);
  dfs(1);
  for (int i = 2; i <= ea; i++) log[i] = log[i >> 1] + 1;
  for (int k = 1; k <= log[ea]; k++)
    for (int i = 1; i + (1 << k) - 1 <= ea; i++)
      ex[i][k] = spmin(ex[i][k - 1], ex[i + (1 << (k - 1))][k - 1]);
  read(qaq);
  for (int rkk = 1, x1, y1, x2, y2; rkk <= qaq; rkk++) {
    read(x1), read(y1), read(x2), read(y2);
    printf("%lld\n", solve(x1, y1, x2, y2));
  }
  return 0;
}
}  // namespace RKK
int main() { return RKK::main(); }
