#include <bits/stdc++.h>
using namespace std;
int cas, n, A, B;
int main() {
  scanf("%d", &cas);
  while (cas--) {
    scanf("%d%d%d", &n, &A, &B);
    int m = (n + 1) >> 1;
    int per = m / A + (m % A ? 1 : 0);
    if (m + (per - 1ll) * B >= n)
      printf("%lld\n", m + (per - 1ll) * B);
    else
      printf("%d\n", n);
  }
  return 0;
}
