#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    int n, a[10000];
    memset(a, 0, sizeof(a));
    scanf("%d", &n);
    for (int i = 1; i <= n; i++) {
      scanf("%d", &a[i]);
    }
    for (int i = 1; i <= n / 2; i++) {
      printf("%d %d ", a[i * 2] * (-1), a[i * 2 - 1]);
    }
    printf("\n");
  }
  return 0;
}
